Updated the description in [ExtraPatches] for mods_order.txt

Tweaked the error log entry for mods_order.txt.
Removed unnecessary Inject_SwitchHandHook (unused since 4.2.1)
This commit is contained in:
NovaRain
2023-06-15 13:38:04 +08:00
parent 7baa6de014
commit 23d1e3b9c8
5 changed files with 18 additions and 19 deletions
+13 -8
View File
@@ -19,14 +19,19 @@ UseCommandLine=0
;This section allows you to set multiple paths to folders containing mods or patches
;Paths to folders and Fallout .dat files are supported
;The PatchFileXX options are available from 0 to 99. Larger numbers take precedence over smaller numbers (same as patchXXX.dat)
;Starting from 4.2.6, the game will automatically search and load custom .dat files (or folders named as .dat files) from <GameRoot>\mods\
;The load order of files in the folder will be in reverse alphabetical order of the filenames
;Autoloaded files will have a higher priority than the files specified in the PatchFileXX options
;The complete order of how the engine finds game data is:
;master_patches > critter_patches > mods > PatchFile99..PatchFile0 > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;Starting from 4.3.9/3.8.39, the game will load custom .dat files and folders from <GameRoot>\mods\mods_order.txt
;The files and folders in mods_order.txt will have a higher priority than the PatchFileXX options
;The complete order of how the engine loads game data is:
;master_patches > critter_patches > mods_order.txt > PatchFileXX > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;PatchFile0=mods\RP_data
;PatchFile1=
;Some details about mods_order.txt:
;If mods_order.txt does not exist, sfall will create one in <GameRoot>\mods\
;To install a new mod, copy the file/folder to <GameRoot>\mods\ and add its name to mods_order.txt
;Mods will be loaded line by line from top to bottom. You can change the load order in a text editor
;To disable a mod temporarily, you can comment it out by adding a ';' or '#' to the beginning of the line
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Speed]
;Set to 1 to enable options related to the game speed adjustment (SpeedMulti#, SpeedKey#, SpeedModKey, and SpeedToggleKey)
@@ -286,9 +291,9 @@ UseFileSystemOverride=0
;If you want to load multiple patch files (up to 1000) at once, you can include a %d in the file name (sprintf syntax)
;PatchFile=patch%03d.dat
;Set to 1 to change the order of how the engine finds game data
;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
;Modified: master_patches > critter_patches > extra_patches > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;Set to 1 to change the order of how the engine loads game data
;Old: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
;New: master_patches > critter_patches > [ExtraPatches] > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;This option is always enabled in 4.3/3.8.30 or later. The information is left for reference only
DataLoadOrderPatch=1
+1 -5
View File
@@ -657,15 +657,11 @@ void Inject_MoveCostHook() {
HookCalls(MoveCostHook, { 0x417665, 0x44B88A });
}
void Inject_SwitchHandHook() {
void Inject_InventoryMoveHook() {
HookCalls(SwitchHandHook, {
0x4712E3, // left slot
0x47136D // right slot
});
}
void Inject_InventoryMoveHook() {
Inject_SwitchHandHook();
MakeJump(0x4713A9, UseArmorHack); // old 0x4713A3
MakeJump(0x476491, DropIntoContainerHack);
MakeJumps(DropIntoContainerHandSlotHack, { 0x471338, 0x4712AB });
-1
View File
@@ -9,7 +9,6 @@ void InitInventoryHookScripts();
void Inject_RemoveInvenObjHook();
void Inject_MoveCostHook();
void Inject_SwitchHandHook();
void Inject_InventoryMoveHook();
void Inject_InvenWieldHook();
+1 -1
View File
@@ -361,7 +361,7 @@ static void GetExtraPatches() {
patchFiles.push_back(patch);
}
} else {
dlog_f("Error opening %s for read: %d\n", DL_MAIN, loadOrderFilePath.c_str() + 2, GetLastError());
dlog_f("Error opening %s for read: 0x%x\n", DL_MAIN, loadOrderFilePath.c_str() + 2, GetLastError());
}
// Remove first duplicates
+3 -4
View File
@@ -41,7 +41,6 @@ static bool isControllingNPC = false;
static char skipCounterAnim;
static int delayedExperience;
static bool switchHandHookInjected = false;
struct WeaponStateSlot {
long npcID;
@@ -537,6 +536,7 @@ static void NPCWeaponTweak() {
}
void PartyControl::SwitchToCritter(fo::GameObject* critter) {
static bool onlyOnce = false;
if (skipCounterAnim == 2 && critter && critter == realDude.obj_dude) {
skipCounterAnim--;
SafeWrite8(0x422BDE, 1); // restore
@@ -577,9 +577,8 @@ void PartyControl::SwitchToCritter(fo::GameObject* critter) {
}
SetCurrentDude(critter);
if (!switchHandHookInjected) {
switchHandHookInjected = true;
//if (!HookScripts::IsInjectHook(HOOK_INVENTORYMOVE)) Inject_SwitchHandHook();
if (!onlyOnce) {
onlyOnce = true;
ScriptExtender::OnMapExit() += []() {
if (!partySneakWorking.empty()) {