mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
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:
+2
-2
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.4.3.1
|
||||
;v4.4.4
|
||||
|
||||
[Main]
|
||||
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
|
||||
@@ -767,7 +767,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)
|
||||
;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
|
||||
AIDrugUsePerfFix=0
|
||||
AIDrugUsePerfFix=1
|
||||
|
||||
;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
|
||||
|
||||
@@ -1432,8 +1432,8 @@
|
||||
- name: set_worldmap_heal_time
|
||||
detail: void set_worldmap_heal_time(int time)
|
||||
doc: |
|
||||
Sets the time interval in minutes for healing during world map travel
|
||||
- passing 0 will revert to 1 second in real time (vanilla engine behavior)
|
||||
Sets the time interval in minutes for healing during world map travel. The default is 180
|
||||
- passing 0 will revert to 1 second of real time (vanilla engine behavior)
|
||||
- passing -1 will disable healing during travel
|
||||
- the time interval will be reset each time the player reloads the game
|
||||
macro: sfall.h
|
||||
|
||||
@@ -1152,8 +1152,8 @@ sfall_funcX metarule functions
|
||||
----
|
||||
#### set_worldmap_heal_time
|
||||
`void sfall_func1("set_worldmap_heal_time", int minutes)`
|
||||
- Sets the time interval in minutes for healing during world map travel
|
||||
- Passing 0 will revert to 1 second in real time (vanilla engine behavior)
|
||||
- Sets the time interval in minutes for healing during world map travel. The default is 180
|
||||
- Passing 0 will revert to 1 second of real time (vanilla engine behavior)
|
||||
- Passing -1 will disable healing during travel
|
||||
- The time interval will be reset each time the player reloads the game
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ void __stdcall CombatAI::ai_check_drugs(fo::GameObject* source) {
|
||||
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
|
||||
if (drugUsePerfFixMode == 1) {
|
||||
if (drugUsePerfFixMode != 2) {
|
||||
counter = 0;
|
||||
item = fo::func::inven_find_type(source, fo::ItemType::item_type_drug, &slot);
|
||||
if (!item) {
|
||||
@@ -202,7 +202,7 @@ void CombatAI::init() {
|
||||
sf::SafeWrite8(0x429BE9, sf::CodeType::JumpNZ); // jz > jnz
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -2054,7 +2054,7 @@ noRange:
|
||||
static void __declspec(naked) process_rads_hack() {
|
||||
static const DWORD process_rads_Ret = 0x42D708;
|
||||
__asm {
|
||||
test ebp, ebp;
|
||||
test ebp, ebp; // modifier: -1 - recovery, 1 - downgrade level
|
||||
jl fix;
|
||||
test byte ptr [ecx + damageFlags], DAM_DEAD;
|
||||
jnz fix;
|
||||
@@ -3920,10 +3920,10 @@ void BugFixes::init() {
|
||||
// Display a pop-up message box about death from radiation
|
||||
HookCall(0x42D733, process_rads_hook_msg);
|
||||
|
||||
//int drugUsePerfFix = IniReader::GetConfigInt("Misc", "AIDrugUsePerfFix", 0);
|
||||
//int drugUsePerfFix = IniReader::GetConfigInt("Misc", "AIDrugUsePerfFix", 1);
|
||||
//if (drugUsePerfFix > 0) {
|
||||
// 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
|
||||
// MakeCall(0x42869D, ai_check_drugs_hack_break);
|
||||
// MakeCall(0x4286AB, ai_check_drugs_hack_check, 1);
|
||||
|
||||
@@ -61,7 +61,7 @@ static DWORD worldMapTicks;
|
||||
|
||||
static DWORD WorldMapEncounterRate;
|
||||
|
||||
static constexpr long WorldMapHealingDefaultInterval = 0;
|
||||
static constexpr long WorldMapHealingDefaultInterval = 180 * 60 * 10; // 3 hrs
|
||||
// Healing interval in game time
|
||||
static long worldMapHealingInterval = WorldMapHealingDefaultInterval;
|
||||
static DWORD worldMapLastHealTime;
|
||||
|
||||
+3
-3
@@ -24,7 +24,7 @@
|
||||
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 4
|
||||
#define VERSION_BUILD 3
|
||||
#define VERSION_REV 2
|
||||
#define VERSION_BUILD 4
|
||||
#define VERSION_REV 0
|
||||
|
||||
#define VERSION_STRING "4.4.3.2"
|
||||
#define VERSION_STRING "4.4.4"
|
||||
|
||||
Reference in New Issue
Block a user