Updated the description in [ExtraPatches] for mods_order.txt

Tweaked the error log entry for mods_order.txt.
Minor code edits.
This commit is contained in:
NovaRain
2023-06-15 13:40:12 +08:00
parent 1a6a9e5ec1
commit f0784e2987
3 changed files with 17 additions and 10 deletions
+13 -5
View File
@@ -15,11 +15,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)
;The complete order of how the engine finds game data is:
;master_patches > critter_patches > 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)
@@ -288,9 +296,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 -1
View File
@@ -353,7 +353,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
@@ -35,7 +35,6 @@ static bool isControllingNPC = false;
static char skipCounterAnim;
static int delayedExperience;
static bool switchHandHookInjected = false;
struct WeaponStateSlot {
long npcID;
@@ -427,6 +426,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
@@ -442,9 +442,8 @@ void PartyControl::SwitchToCritter(fo::GameObject* critter) {
}
SetCurrentDude(critter);
if (!switchHandHookInjected) {
switchHandHookInjected = true;
//if (!HookScripts::IsInjectHook(HOOK_INVENTORYMOVE)) Inject_SwitchHandHook();
if (!onlyOnce) {
onlyOnce = true;
HookCall(0x49EB09, proto_name_hook);