From 44d668f50b66530d458c2e405b1c60e0c727fe24 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Tue, 24 Jul 2018 12:07:02 +0800 Subject: [PATCH] Renamed DialogFemaleMsgFile to FemaleDialogMsgs, and added its description to ddraw.ini. Added additional notes for the new functionality of ExtraGameMsgFileList to documents. --- artifacts/ddraw.ini | 6 ++++++ artifacts/scripting/sfall function notes.txt | 1 + sfall/Modules/ExtraSaveSlots.cpp | 7 ++----- sfall/Modules/LoadOrder.cpp | 5 ++--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 9ffbbab6..b21358ce 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -195,6 +195,9 @@ WorldMapSlots=0 ;Modified: master_patches > critter_patches > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat DataLoadOrderPatch=0 +;Set to 1 to enable loading alternative dialog msg files from text/language/dialog_female/ for female PC +FemaleDialogMsgs=0 + ;To change the default and starting player models, uncomment the next four lines. ;The default models can also be changed ingame via script ;MaleStartModel=hmwarr @@ -560,6 +563,9 @@ CarChargingFix=1 InstantWeaponEquip=0 ;To add additional game msg files, uncomment the next line and set a comma delimited list of filenames without .msg extension +;By default, the files will have consecutive numbers assigned beginning with 0 +;You can use the syntax 'filename : number' to manually assign numbers to specific msg files, with each pair separated by a comma +;If a file after the specified pair does not have a number assigned, it will have the next consecutive number from the last pair ;You need to use the message_str_game script function to get messages from the files ;ExtraGameMsgFileList= diff --git a/artifacts/scripting/sfall function notes.txt b/artifacts/scripting/sfall function notes.txt index 594ecc91..0641c5f5 100644 --- a/artifacts/scripting/sfall function notes.txt +++ b/artifacts/scripting/sfall function notes.txt @@ -304,6 +304,7 @@ Some utility/math functions are available: - works exactly the same as message_str, except you get messages from files in "text/english/game" folder - use GAME_MSG_* defines or mstr_* macros from sfall.h to use specific msg file - Additional game msg files added by ExtraGameMsgFileList setting will have consecutive fileIds assigned beginning from 0x2000. (e.g. if you set ExtraGameMsgFileList=foo,bar in ddraw.ini, foo.msg will be associated with 0x2000 and bar.msg with 0x2001.) +- if a file has a specific number assigned in ExtraGameMsgFileList, its fileId will be (0x2000 + assigned number). (e.g. with ExtraGameMsgFileList=foo,bar:2,foobar in ddraw.ini, bar.msg will be associated with 0x2002 and foobar.msg with 0x2003.) > int sneak_success - returns 1 if the player is currently sneaking, and last sneak attempt (roll against skill) was successful; 0 otherwise diff --git a/sfall/Modules/ExtraSaveSlots.cpp b/sfall/Modules/ExtraSaveSlots.cpp index c282845c..22bce669 100644 --- a/sfall/Modules/ExtraSaveSlots.cpp +++ b/sfall/Modules/ExtraSaveSlots.cpp @@ -469,11 +469,8 @@ void EnableSuperSaving() { // Draw button text MakeCalls(draw_page_text, {0x47E6E8}); - // check save buttons - MakeCalls(check_page_buttons, {0x47BD49}); - - // check load buttons - MakeCalls(check_page_buttons, {0x47CB1C}); + // check save/load buttons + MakeCalls(check_page_buttons, {0x47BD49, 0x47CB1C}); // save current page and list positions to file on load/save scrn exit MakeCalls(save_page_offsets, {0x47D828}); diff --git a/sfall/Modules/LoadOrder.cpp b/sfall/Modules/LoadOrder.cpp index bddaa209..50efcce6 100644 --- a/sfall/Modules/LoadOrder.cpp +++ b/sfall/Modules/LoadOrder.cpp @@ -20,7 +20,6 @@ #include "..\FalloutEngine\Fallout2.h" #include "..\Logging.h" #include "LoadGameHook.h" - #include "LoadOrder.h" namespace sfall @@ -145,8 +144,8 @@ void LoadOrder::init() { dlogr(" Done", DL_INIT); } - if (GetConfigInt("Misc", "DialogFemaleMsgFile", 0)) { - dlog("Applying dialog files load order patch.", DL_INIT); + if (GetConfigInt("Misc", "FemaleDialogMsgs", 0)) { + dlog("Applying alternative female dialog files patch.", DL_INIT); MakeJump(0x4A6BCD, scr_get_dialog_msg_file_hack1); MakeJump(0x4A6BF5, scr_get_dialog_msg_file_hack2); dlogr(" Done", DL_INIT);