Added SpecialDeathGVAR option to override the global variable number for special death.

Minor fix for Stats.ini.
This commit is contained in:
NovaRain
2019-03-17 10:35:12 +08:00
parent aa91e9fad4
commit 18649329ec
4 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -36,7 +36,7 @@
;If the value is set to -99999, the variable will be ignored (similar to comment out that line)
;You can add simple extra perks with ID numbers from 119 to 255
; that do not require using scripting functions to change player stats
; that do not require using scripting functions to change player stats, and can also be used for Armor perks
;These parameters are only for extra perks
;Stat1-Stat2 = same as Stat
;Stat1Mag-Stat2Mag = same as StatMag
+4
View File
@@ -676,6 +676,10 @@ SkipLoadingGameSettings=0
;Set to 1 to prevent the inventory/loot/automap interfaces from being placed on top of other script-created windows
InterfaceDontMoveOnTop=0
;Overrides the global variable number used to show the special death message of the Modoc toilet explosion
;Set to -1 to disable the special death message when the global variable is set
SpecialDeathGVAR=491
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
CreditsAtBottom=0
+3
View File
@@ -924,6 +924,9 @@ void MiscPatches::init() {
dlogr(" Done", DL_INIT);
}
int gvar = GetConfigInt("Misc", "SpecialDeathGVAR", fo::GVAR_MODOC_SHITTY_DEATH);
if (gvar != fo::GVAR_MODOC_SHITTY_DEATH) SafeWrite32(0x440C2A, gvar);
LoadGameHook::OnBeforeGameStart() += BodypartHitChances; // set on start & load
CombatProcFix();
+1 -1
View File
@@ -258,7 +258,7 @@ void Stats::init() {
StatFormulas[i * 2 + 1] = GetPrivateProfileInt(key, "min", StatFormulas[i * 2 + 1], statFile);
for (int j = 0; j < fo::Stat::STAT_max_hit_points; j++) {
sprintf(buf2, "shift%d", j);
StatShifts[i * 7 + j] = GetPrivateProfileInt(key, buf2, StatShifts[i * 7 + 0], statFile);
StatShifts[i * 7 + j] = GetPrivateProfileInt(key, buf2, StatShifts[i * 7 + j], statFile);
sprintf(buf2, "multi%d", j);
_gcvt(StatMulti[i * 7 + j], 16, buf3);
GetPrivateProfileStringA(key, buf2, buf3, buf2, 256, statFile);