diff --git a/EEex/EEex.tp2 b/EEex/EEex.tp2 index 792c1ce..e6af512 100644 --- a/EEex/EEex.tp2 +++ b/EEex/EEex.tp2 @@ -1,6 +1,6 @@ BACKUP ~EEex/backup~ AUTHOR ~Bubb~ -VERSION ~v0.10.1.1-alpha~ +VERSION ~devel~ README ~EEex/readme-EEex.html~ BEGIN ~EEex~ LABEL ~B3-EEex-Main~ @@ -50,7 +50,7 @@ REQUIRE_PREDICATE (GAME_IS ~bgee bg2ee eet iwdee~ AND FILE_EXISTS ~data/PATCH26. BEGIN ~Experimental - Use LuaJIT (can help stuttering)~ LABEL ~B3-EEex-LuaJIT~ -REQUIRE_COMPONENT ~EEex.tp2~ ~0~ ~This component requires the main component to be installed.~ +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ (ID_OF_LABEL ~EEex.tp2~ ~B3-EEex-Main~) ~This component requires the main component to be installed.~ COPY ~InfinityLoader.ini~ ~.~ REPLACE_TEXTUALLY ~^\(LuaLibrary=\).*~ ~\1lua51.dll~ @@ -61,15 +61,23 @@ REQUIRE_COMPONENT ~EEex.tp2~ ~0~ ~This component requires the main component to BEGIN ~Enable effect menu module - LShift-on-hover to view spells affecting creature~ LABEL ~B3-EEex-Module-Effect-Menu~ -REQUIRE_COMPONENT ~EEex.tp2~ ~0~ ~This component requires the main component to be installed.~ +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ (ID_OF_LABEL ~EEex.tp2~ ~B3-EEex-Main~) ~This component requires the main component to be installed.~ COPY ~override/EEex_Modules.lua~ ~override~ REPLACE_TEXTUALLY ~^\([ %TAB%]+\["B3EffMen"\][ %TAB%]+=[ %TAB%]+\)false~ ~\1true~ BUT_ONLY +BEGIN ~Enable empty container module - Highlight empty containers in gray instead of cyan~ LABEL ~B3-EEex-Module-Empty-Containers~ +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ (ID_OF_LABEL ~EEex.tp2~ ~B3-EEex-Main~) ~This component requires the main component to be installed.~ + + COPY ~override/EEex_Modules.lua~ ~override~ + REPLACE_TEXTUALLY ~^\([ %TAB%]+\["B3EmptyContainer"\][ %TAB%]+=[ %TAB%]+\)false~ ~\1true~ + BUT_ONLY + + BEGIN ~Enable timer module - Visual indicators for modal actions, contingencies, and spell/item cooldowns~ LABEL ~B3-EEex-Module-Timer-Main~ -REQUIRE_COMPONENT ~EEex.tp2~ ~0~ ~This component requires the main component to be installed.~ +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ (ID_OF_LABEL ~EEex.tp2~ ~B3-EEex-Main~) ~This component requires the main component to be installed.~ COPY ~override/EEex_Modules.lua~ ~override~ REPLACE_TEXTUALLY ~^\([ %TAB%]+\["B3Timer"\][ %TAB%]+=[ %TAB%]+\)false~ ~\1true~ @@ -77,7 +85,7 @@ REQUIRE_COMPONENT ~EEex.tp2~ ~0~ ~This component requires the main component to BEGIN ~Timer module - Show modal actions (red bar)~ LABEL ~B3-EEex-Module-Timer-Modal~ -REQUIRE_COMPONENT ~EEex.tp2~ ~2~ ~This component requires the "Enable timer module" component to be installed.~ +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ (ID_OF_LABEL ~EEex.tp2~ ~B3-EEex-Module-Timer-Main~) ~This component requires the "Enable timer module" component to be installed.~ COPY ~override/B3Timer.lua~ ~override~ REPLACE_TEXTUALLY ~^\(B3Timer_ShowModalTimer = \)[^ %TAB%%WNL%]+~ ~\1true~ @@ -85,7 +93,7 @@ REQUIRE_COMPONENT ~EEex.tp2~ ~2~ ~This component requires the "Enable timer modu BEGIN ~Timer module - Show contingencies (green bar)~ LABEL ~B3-EEex-Module-Timer-Contingency~ -REQUIRE_COMPONENT ~EEex.tp2~ ~2~ ~This component requires the "Enable timer module" component to be installed.~ +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ (ID_OF_LABEL ~EEex.tp2~ ~B3-EEex-Module-Timer-Main~) ~This component requires the "Enable timer module" component to be installed.~ COPY ~override/B3Timer.lua~ ~override~ REPLACE_TEXTUALLY ~^\(B3Timer_ShowContingencyTimer = \)[^ %TAB%%WNL%]+~ ~\1true~ @@ -93,23 +101,23 @@ REQUIRE_COMPONENT ~EEex.tp2~ ~2~ ~This component requires the "Enable timer modu BEGIN ~Timer module - Show spell/item cooldowns (cyan bar)~ LABEL ~B3-EEex-Module-Timer-Aura~ -REQUIRE_COMPONENT ~EEex.tp2~ ~2~ ~This component requires the "Enable timer module" component to be installed.~ +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ (ID_OF_LABEL ~EEex.tp2~ ~B3-EEex-Module-Timer-Main~) ~This component requires the "Enable timer module" component to be installed.~ COPY ~override/B3Timer.lua~ ~override~ REPLACE_TEXTUALLY ~^\(B3Timer_ShowCastTimer = \)[^ %TAB%%WNL%]+~ ~\1true~ BUT_ONLY -BEGIN ~Time step module - Advance 1 game tick on keypress~ LABEL ~B3-EEex-Module-Time-Step~ -REQUIRE_COMPONENT ~EEex.tp2~ ~0~ ~This component requires the main component to be installed.~ +BEGIN ~Enable time step module - Advance 1 game tick on keypress~ LABEL ~B3-EEex-Module-Time-Step~ +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ (ID_OF_LABEL ~EEex.tp2~ ~B3-EEex-Main~) ~This component requires the main component to be installed.~ COPY ~override/EEex_Modules.lua~ ~override~ REPLACE_TEXTUALLY ~^\([ %TAB%]+\["B3TimeStep"\][ %TAB%]+=[ %TAB%]+\)false~ ~\1true~ BUT_ONLY -BEGIN ~Hotkey module - Edit override/B3Hotkey.lua to create advanced spell hotkeys~ LABEL ~B3-EEex-Module-Hotkey~ -REQUIRE_COMPONENT ~EEex.tp2~ ~0~ ~This component requires the main component to be installed.~ +BEGIN ~Enable hotkey module - Edit override/B3Hotkey.lua to create advanced spell hotkeys~ LABEL ~B3-EEex-Module-Hotkey~ +REQUIRE_PREDICATE MOD_IS_INSTALLED ~EEex.tp2~ (ID_OF_LABEL ~EEex.tp2~ ~B3-EEex-Main~) ~This component requires the main component to be installed.~ COPY ~override/EEex_Modules.lua~ ~override~ REPLACE_TEXTUALLY ~^\([ %TAB%]+\["B3Hotkey"\][ %TAB%]+=[ %TAB%]+\)false~ ~\1true~ diff --git a/EEex/copy/B3EmptyContainer.lua b/EEex/copy/B3EmptyContainer.lua new file mode 100644 index 0000000..e6ddf2d --- /dev/null +++ b/EEex/copy/B3EmptyContainer.lua @@ -0,0 +1,45 @@ + +function B3EmptyContainer_OnBeforeContainerOutlineRender(container, color) + if color.value ~= 0xFF00 and container.m_lstItems.m_nCount == 0 then + color.value = 0x808080 + end +end + +(function() + + EEex_DisableCodeProtection() + + EEex_HookBeforeCallWithLabels(EEex_Label("Hook-CGameContainer::Render()-B3EmptyContainer"), { + {"hook_integrity_watchdog_ignore_registers", { + EEex_HookIntegrityWatchdogRegister.R10, EEex_HookIntegrityWatchdogRegister.R11 + }}}, + EEex_FlattenTable({ + {[[ + #MAKE_SHADOW_SPACE(80) + mov qword ptr ss:[rsp+#SHADOW_SPACE_BOTTOM(-8)], rcx + mov qword ptr ss:[rsp+#SHADOW_SPACE_BOTTOM(-16)], rdx + mov qword ptr ss:[rsp+#SHADOW_SPACE_BOTTOM(-24)], r8 + mov qword ptr ss:[rsp+#SHADOW_SPACE_BOTTOM(-32)], r9 + ]]}, + EEex_GenLuaCall("B3EmptyContainer_OnBeforeContainerOutlineRender", { + ["args"] = { + function(rspOffset) return {"mov qword ptr ss:[rsp+#$(1)], r14", {rspOffset}, "#ENDL"}, "CGameContainer" end, + function(rspOffset) return {[[ + lea rax, qword ptr ds:[rsp+#LAST_FRAME_TOP(32)] + mov qword ptr ss:[rsp+#$(1)], rax ]], {rspOffset}, [[ #ENDL + ]]}, "Primitive" end, + }, + }), + {[[ + call_error: + mov rcx, qword ptr ss:[rsp+#SHADOW_SPACE_BOTTOM(-8)] + mov rdx, qword ptr ss:[rsp+#SHADOW_SPACE_BOTTOM(-16)] + mov r8, qword ptr ss:[rsp+#SHADOW_SPACE_BOTTOM(-24)] + mov r9, qword ptr ss:[rsp+#SHADOW_SPACE_BOTTOM(-32)] + #DESTROY_SHADOW_SPACE + ]]}, + }) + ) + + EEex_EnableCodeProtection() +end)() diff --git a/EEex/copy/EEex_Modules.lua b/EEex/copy/EEex_Modules.lua index ba28655..77661bf 100644 --- a/EEex/copy/EEex_Modules.lua +++ b/EEex/copy/EEex_Modules.lua @@ -1,9 +1,10 @@ EEex_Modules = { - ["B3EffMen"] = false, - ["B3Hotkey"] = false, - ["B3Invis"] = false, - ["B3Scale"] = false, - ["B3Timer"] = false, - ["B3TimeStep"] = false, + ["B3EffMen"] = false, + ["B3EmptyContainer"] = false, + ["B3Hotkey"] = false, + ["B3Invis"] = false, + ["B3Scale"] = false, + ["B3Timer"] = false, + ["B3TimeStep"] = false, } diff --git a/EEex/loader/EEex.dll b/EEex/loader/EEex.dll index 4e63b81..5efa7e0 100644 Binary files a/EEex/loader/EEex.dll and b/EEex/loader/EEex.dll differ diff --git a/EEex/loader/InfinityLoader.db b/EEex/loader/InfinityLoader.db index 53a798b..cbedf53 100644 --- a/EEex/loader/InfinityLoader.db +++ b/EEex/loader/InfinityLoader.db @@ -1422,6 +1422,10 @@ Operations=ADD 31 Pattern=6689B3BA040000 Operations=ADD -5 +[Hook-CGameContainer::Render()-B3EmptyContainer] +Pattern=85C00F8893000000 +Operations=ADD 150 + [Hook-CGameEffect::CheckAdd()-FixShouldTransformSpellImmunityStrref] Pattern=448D7E01BBFFFFFFFF Operations=ADD 4 diff --git a/EEex/loader/LuaBindings-v2.6.6.0.dll b/EEex/loader/LuaBindings-v2.6.6.0.dll index 41b7f19..2c5c3e4 100644 Binary files a/EEex/loader/LuaBindings-v2.6.6.0.dll and b/EEex/loader/LuaBindings-v2.6.6.0.dll differ diff --git a/package_mod.bat b/package_mod.bat index cfe3f2e..fcb3ebb 100644 --- a/package_mod.bat +++ b/package_mod.bat @@ -6,7 +6,7 @@ call "%~dp0..\ModPackaging\utilities\ie_games.bat" REM /* MODIFY: set the values of the 3 variables below to reflect the current mod version */ set "mod_name=EEex" -set "mod_version=v0.10.1.1-alpha" +set "mod_version=devel" set mod_folder=EEex REM /* MODIFY: list here which IE games the mod is compatible with, from this list of possibilities: */ diff --git a/pdb/EEex.pdb b/pdb/EEex.pdb index 2c7785d..b05db82 100644 Binary files a/pdb/EEex.pdb and b/pdb/EEex.pdb differ diff --git a/pdb/LuaBindings-v2.6.6.0.pdb b/pdb/LuaBindings-v2.6.6.0.pdb index 8bfbeb4..8815c7f 100644 Binary files a/pdb/LuaBindings-v2.6.6.0.pdb and b/pdb/LuaBindings-v2.6.6.0.pdb differ