Changed the world map healing rate patch to be enabled by default

* default 3 hrs according to Fallout v1.2 manual errata.

Changed AIDrugUsePerfFix to be enabled by default (UPU/RPU have it
enabled for years, and F2:CE also implemented a similar fix.)

Updated version number.
This commit is contained in:
NovaRain
2024-05-28 21:30:52 +08:00
parent 944a1be064
commit 7dc499eb24
6 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
;sfall configuration settings ;sfall configuration settings
;v3.8.43.1 ;v3.8.44
[Main] [Main]
;Set to 1 if you want to use command line arguments to tell sfall to use another ini file ;Set to 1 if you want to use command line arguments to tell sfall to use another ini file
@@ -775,7 +775,7 @@ AIBestWeaponFix=1
;Set to 2 to allow NPCs to use only the drugs listed in chem_primary_desire and healing drugs (stimpaks and healing powder) ;Set to 2 to allow NPCs to use only the drugs listed in chem_primary_desire and healing drugs (stimpaks and healing powder)
;Note: chem_primary_desire without fixes prevents the specified item from being consumed if all three values in the list are the same PID ;Note: chem_primary_desire without fixes prevents the specified item from being consumed if all three values in the list are the same PID
;chem_primary_desire also works as a priority list of drug items the NPC will try to pick up in combat when they are on the ground ;chem_primary_desire also works as a priority list of drug items the NPC will try to pick up in combat when they are on the ground
AIDrugUsePerfFix=0 AIDrugUsePerfFix=1
;Set to 1 to fix the bug of using First Aid/Doctor skills when using them on the player ;Set to 1 to fix the bug of using First Aid/Doctor skills when using them on the player
;This will cause the party member to perform First Aid/Doctor skills when you use them on the player, but only if ;This will cause the party member to perform First Aid/Doctor skills when you use them on the player, but only if
+2 -2
View File
@@ -1135,8 +1135,8 @@ sfall_funcX metarule functions
---- ----
#### set_worldmap_heal_time #### set_worldmap_heal_time
`void sfall_func1("set_worldmap_heal_time", int minutes)` `void sfall_func1("set_worldmap_heal_time", int minutes)`
- Sets the time interval in minutes for healing during world map travel - Sets the time interval in minutes for healing during world map travel. The default is 180
- Passing 0 will revert to 1 second in real time (vanilla engine behavior) - Passing 0 will revert to 1 second of real time (vanilla engine behavior)
- Passing -1 will disable healing during travel - Passing -1 will disable healing during travel
- The time interval will be reset each time the player reloads the game - The time interval will be reset each time the player reloads the game
+2 -2
View File
@@ -109,7 +109,7 @@ void __stdcall CombatAI::ai_check_drugs(fo::GameObject* source) {
if (counter <= 2) break; // there is a match if (counter <= 2) break; // there is a match
// [FIX] for AI not taking chem_primary_desire in AI.txt as a preference list when using drugs in the inventory // [FIX] for AI not taking chem_primary_desire in AI.txt as a preference list when using drugs in the inventory
if (drugUsePerfFixMode == 1) { if (drugUsePerfFixMode != 2) {
counter = 0; counter = 0;
item = fo::func::inven_find_type(source, fo::ItemType::item_type_drug, &slot); item = fo::func::inven_find_type(source, fo::ItemType::item_type_drug, &slot);
if (!item) { if (!item) {
@@ -202,7 +202,7 @@ void CombatAI::init() {
sf::SafeWrite8(0x429BE9, sf::CodeType::JumpNZ); // jz > jnz sf::SafeWrite8(0x429BE9, sf::CodeType::JumpNZ); // jz > jnz
sf::SafeWrite8(0x429BF1, sf::CodeType::JumpShort); // jnz > jmp sf::SafeWrite8(0x429BF1, sf::CodeType::JumpShort); // jnz > jmp
drugUsePerfFixMode = sf::IniReader::GetConfigInt("Misc", "AIDrugUsePerfFix", 0); drugUsePerfFixMode = sf::IniReader::GetConfigInt("Misc", "AIDrugUsePerfFix", 1);
if (drugUsePerfFixMode > 0) sf::dlogr("Applying AI drug use preference fix.", DL_FIX); if (drugUsePerfFixMode > 0) sf::dlogr("Applying AI drug use preference fix.", DL_FIX);
} }
+3 -3
View File
@@ -2038,7 +2038,7 @@ noRange:
static void __declspec(naked) process_rads_hack() { static void __declspec(naked) process_rads_hack() {
static const DWORD process_rads_Ret = 0x42D708; static const DWORD process_rads_Ret = 0x42D708;
__asm { __asm {
test ebp, ebp; test ebp, ebp; // modifier: -1 - recovery, 1 - downgrade level
jl fix; jl fix;
test byte ptr [ecx + damageFlags], DAM_DEAD; test byte ptr [ecx + damageFlags], DAM_DEAD;
jnz fix; jnz fix;
@@ -3925,10 +3925,10 @@ void BugFixes::init() {
// Display a pop-up message box about death from radiation // Display a pop-up message box about death from radiation
HookCall(0x42D733, process_rads_hook_msg); HookCall(0x42D733, process_rads_hook_msg);
//int drugUsePerfFix = IniReader::GetConfigInt("Misc", "AIDrugUsePerfFix", 0); //int drugUsePerfFix = IniReader::GetConfigInt("Misc", "AIDrugUsePerfFix", 1);
//if (drugUsePerfFix > 0) { //if (drugUsePerfFix > 0) {
// dlogr("Applying AI drug use preference fix.", DL_FIX); // dlogr("Applying AI drug use preference fix.", DL_FIX);
// if (drugUsePerfFix == 1) { // if (drugUsePerfFix != 2) {
// // Fix for AI not taking chem_primary_desire in AI.txt as a preference list when using drugs in the inventory // // Fix for AI not taking chem_primary_desire in AI.txt as a preference list when using drugs in the inventory
// MakeCall(0x42869D, ai_check_drugs_hack_break); // MakeCall(0x42869D, ai_check_drugs_hack_break);
// MakeCall(0x4286AB, ai_check_drugs_hack_check, 1); // MakeCall(0x4286AB, ai_check_drugs_hack_check, 1);
+1 -1
View File
@@ -57,7 +57,7 @@ static DWORD worldMapTicks;
static DWORD WorldMapEncounterRate; static DWORD WorldMapEncounterRate;
static const long WorldMapHealingDefaultInterval = 0; static const long WorldMapHealingDefaultInterval = 180 * 60 * 10; // 3 hrs
// Healing interval in game time // Healing interval in game time
static long worldMapHealingInterval = WorldMapHealingDefaultInterval; static long worldMapHealingInterval = WorldMapHealingDefaultInterval;
static DWORD worldMapLastHealTime; static DWORD worldMapLastHealTime;
+3 -3
View File
@@ -24,7 +24,7 @@
#define VERSION_MAJOR 3 #define VERSION_MAJOR 3
#define VERSION_MINOR 8 #define VERSION_MINOR 8
#define VERSION_BUILD 43 #define VERSION_BUILD 44
#define VERSION_REV 2 #define VERSION_REV 0
#define VERSION_STRING "3.8.43.2" #define VERSION_STRING "3.8.44"