diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 53be788..2cb70cc 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -5,7 +5,10 @@ on: push: paths: - "Ninja/**/*.src" + - "Ninja/**/*.SRC" - "Ninja/**/*.d" + - "Ninja/**/*.D" + workflow_dispatch: # These permissions are necessary for creating the check runs permissions: diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index c7d19e4..f345621 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -5,8 +5,11 @@ on: push: paths: - "Ninja/**/*.src" + - "Ninja/**/*.SRC" - "Ninja/**/*.d" + - "Ninja/**/*.D" - "_work/Data/**/*" + workflow_dispatch: # These permissions are necessary for creating the check runs permissions: diff --git a/KeepTraderWeapons.vm b/KeepTraderWeapons.vm index a6adc9a..5d1673a 100644 --- a/KeepTraderWeapons.vm +++ b/KeepTraderWeapons.vm @@ -5,6 +5,9 @@ VDFName=.\KeepTraderWeapons.vdf [FILES] ; Modular resources +_work\Data\Anims\*.MDS +_work\Data\Anims\MDS_Mobsi\*.MDS +_work\Data\Anims\MDS_Overlay\*.MDS _work\Data\Anims\_compiled\*.MAN _work\Data\Anims\_compiled\*.MDH _work\Data\Anims\_compiled\*.MDL diff --git a/Ninja/KeepTraderWeapons/Content/FixEquipBestWeapons.d b/Ninja/KeepTraderWeapons/Content/FixEquipBestWeapons.d index 3b798b9..765e97a 100644 --- a/Ninja/KeepTraderWeapons/Content/FixEquipBestWeapons.d +++ b/Ninja/KeepTraderWeapons/Content/FixEquipBestWeapons.d @@ -20,14 +20,8 @@ func void Patch_KTW_FixEquipBestWeapons_Init() { if (!once) { MEM_InitAll(); - const int oCNpc__Enable_equipBestWeapons_G1C = 6955616; //0x6A2260 - const int oCNpc__Enable_equipBestWeapons_G1A = 7162498; //0x6D4A82 - const int oCNpc__Enable_equipBestWeapons_G2C = 7238946; //0x6E7522 - const int oCNpc__Enable_equipBestWeapons_G2A = 7626662; //0x745FA6 - var int addr; addr = MEMINT_SwitchExe(oCNpc__Enable_equipBestWeapons_G1C, - oCNpc__Enable_equipBestWeapons_G1A, - oCNpc__Enable_equipBestWeapons_G2C, - oCNpc__Enable_equipBestWeapons_G2A); + const int oCNpc__Enable_equipBestWeapons[4] = { /*G1*/6955616, /*G1A*/7162498, /*G2*/7238946, /*G2A*/7626662 }; + var int addr; addr = oCNpc__Enable_equipBestWeapons[KTW_EXE]; // Remove default equipping of best melee and ranged weapon to add more conditions const int nop20Bytes[5] = { -1869574000, -1869574000, -1869574000, -1869574000, -1869574000 }; //0x90 * 20 @@ -41,18 +35,12 @@ func void Patch_KTW_FixEquipBestWeapons_Init() { }; func void Patch_KTW_NpcEquipBestWeaponByType(var C_Npc npc, var int type) { - const int oCNpc__EquipBestWeapon_G1C = 6988320; //0x6AA220 - const int oCNpc__EquipBestWeapon_G1A = 7196944; //0x6DD110 - const int oCNpc__EquipBestWeapon_G2C = 7274832; //0x6F0150 - const int oCNpc__EquipBestWeapon_G2A = 7663408; //0x74EF30 + const int oCNpc__EquipBestWeapon[4] = { /*G1*/6988320, /*G1A*/7196944, /*G2*/7274832, /*G2A*/7663408 }; var int npcPtr; npcPtr = _@(npc); const int call = 0; if (CALL_Begin(call)) { CALL_IntParam(_@(type)); - CALL__thiscall(_@(npcPtr), MEMINT_SwitchExe(oCNpc__EquipBestWeapon_G1C, - oCNpc__EquipBestWeapon_G1A, - oCNpc__EquipBestWeapon_G2C, - oCNpc__EquipBestWeapon_G2A)); + CALL__thiscall(_@(npcPtr), oCNpc__EquipBestWeapon[KTW_EXE]); call = CALL_End(); }; }; diff --git a/Ninja/KeepTraderWeapons/Content/exe_G1.d b/Ninja/KeepTraderWeapons/Content/exe_G1.d new file mode 100644 index 0000000..0abc0e4 --- /dev/null +++ b/Ninja/KeepTraderWeapons/Content/exe_G1.d @@ -0,0 +1 @@ +const int KTW_EXE = 0; diff --git a/Ninja/KeepTraderWeapons/Content/exe_G112.d b/Ninja/KeepTraderWeapons/Content/exe_G112.d new file mode 100644 index 0000000..7f14ea9 --- /dev/null +++ b/Ninja/KeepTraderWeapons/Content/exe_G112.d @@ -0,0 +1 @@ +const int KTW_EXE = 1; diff --git a/Ninja/KeepTraderWeapons/Content/exe_G130.d b/Ninja/KeepTraderWeapons/Content/exe_G130.d new file mode 100644 index 0000000..7807f86 --- /dev/null +++ b/Ninja/KeepTraderWeapons/Content/exe_G130.d @@ -0,0 +1 @@ +const int KTW_EXE = 2; diff --git a/Ninja/KeepTraderWeapons/Content/exe_G2.d b/Ninja/KeepTraderWeapons/Content/exe_G2.d new file mode 100644 index 0000000..36ad49a --- /dev/null +++ b/Ninja/KeepTraderWeapons/Content/exe_G2.d @@ -0,0 +1 @@ +const int KTW_EXE = 3; diff --git a/Ninja/KeepTraderWeapons/Content_G1.src b/Ninja/KeepTraderWeapons/Content_G1.src index b45dd71..42a567d 100644 --- a/Ninja/KeepTraderWeapons/Content_G1.src +++ b/Ninja/KeepTraderWeapons/Content_G1.src @@ -1,6 +1,8 @@ Ikarus LeGo +Content\exe_G1.d + Content\FixEquipBestWeapons.d Content\init.d diff --git a/Ninja/KeepTraderWeapons/Content_G112.src b/Ninja/KeepTraderWeapons/Content_G112.src index b45dd71..01a9c72 100644 --- a/Ninja/KeepTraderWeapons/Content_G112.src +++ b/Ninja/KeepTraderWeapons/Content_G112.src @@ -1,6 +1,8 @@ Ikarus LeGo +Content\exe_G112.d + Content\FixEquipBestWeapons.d Content\init.d diff --git a/Ninja/KeepTraderWeapons/Content_G130.src b/Ninja/KeepTraderWeapons/Content_G130.src index b45dd71..4979891 100644 --- a/Ninja/KeepTraderWeapons/Content_G130.src +++ b/Ninja/KeepTraderWeapons/Content_G130.src @@ -1,6 +1,8 @@ Ikarus LeGo +Content\exe_G130.d + Content\FixEquipBestWeapons.d Content\init.d diff --git a/Ninja/KeepTraderWeapons/Content_G2.src b/Ninja/KeepTraderWeapons/Content_G2.src index b45dd71..8d0235d 100644 --- a/Ninja/KeepTraderWeapons/Content_G2.src +++ b/Ninja/KeepTraderWeapons/Content_G2.src @@ -1,6 +1,8 @@ Ikarus LeGo +Content\exe_G2.d + Content\FixEquipBestWeapons.d Content\init.d diff --git a/README.md b/README.md index a5fbe64..d2eb92f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prevent traders from auto-equipping the best weapons which made them inaccessibl This is a modular modification (a.k.a. patch or add-on) that can be installed and uninstalled at any time and is virtually compatible with any modification. It supports Gothic 1, Gothic Sequel, Gothic II (Classic) and Gothic II: NotR. -###### Generated from [szapp/patch-template](https://github.com/szapp/patch-template). +Generated from [szapp/patch-template](https://github.com/szapp/patch-template). ![Screenshot](https://github.com/szapp/KeepTraderWeapons/assets/20203034/1277de6a-f626-4229-95aa-76cf1d9c7dbe) @@ -48,8 +48,8 @@ The patch is also available on ### Requirements - -
GothicGothic SequelGothic II (Classic)Gothic II: NotR
Version 1.08k_modVersion 1.12fReport version 1.30.0.0Report version 2.6.0.0
Ninja 2 (or higher)
+Version 1.08k_modVersion 1.12fReport version 1.30.0.0Report version 2.6.0.0 +Ninja 2.8 or higher