Skip to content

Commit 9ef8631

Browse files
committed
Added the SpecialDeathGVAR option to override the global variable number for special death. Minor fix for Stats.ini
1 parent 46a5572 commit 9ef8631

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

artifacts/config_files/Perks.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
;If the value is set to -99999, the variable will be ignored (similar to comment out that line)
3737

3838
;You can add simple extra perks with ID numbers from 119 to 255
39-
; that do not require using scripting functions to change player stats
39+
; that do not require using scripting functions to change player stats, also can be used perk ID for Armor perk
4040
;These parameters are only for extra perks
4141
;Stat1-Stat2 = same as Stat
4242
;Stat1Mag-Stat2Mag = same as StatMag

artifacts/ddraw.ini

+4
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,10 @@ DisplayElectricalResist=0
696696
;Set to 1 to will not allow placed the game interface(inventory/loot/automap) to on top of other user created windows
697697
InterfaceDontMoveOnTop=0
698698

699+
;Overrides the number of the game global variable used to show the special death slide "Explosion of the toilet" in the Modoc
700+
;Set -1, to disable the special death when set the global variable
701+
SpecialDeathGVAR=491
702+
699703
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
700704
CreditsAtBottom=0
701705

sfall/Modules/MiscPatches.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,9 @@ void MiscPatches::init() {
10071007
SafeWrite32(0x483348, time);
10081008
}
10091009

1010+
int gvar = GetConfigInt("Misc", "SpecialDeathGVAR", fo::GVAR_MODOC_SHITTY_DEATH);
1011+
if (gvar != fo::GVAR_MODOC_SHITTY_DEATH) SafeWrite32(0x440C2A, gvar);
1012+
10101013
LoadGameHook::OnBeforeGameStart() += BodypartHitChances; // set on start & load
10111014

10121015
CombatProcFix();

sfall/Modules/Stats.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void Stats::init() {
295295
StatFormulas[i * 2 + 1] = GetPrivateProfileInt(key, "min", StatFormulas[i * 2 + 1], statFile);
296296
for (int j = 0; j < fo::Stat::STAT_max_hit_points; j++) {
297297
sprintf(buf2, "shift%d", j);
298-
StatShifts[i * 7 + j] = GetPrivateProfileInt(key, buf2, StatShifts[i * 7 + 0], statFile);
298+
StatShifts[i * 7 + j] = GetPrivateProfileInt(key, buf2, StatShifts[i * 7 + j], statFile);
299299
sprintf(buf2, "multi%d", j);
300300
_gcvt(StatMulti[i * 7 + j], 16, buf3);
301301
GetPrivateProfileStringA(key, buf2, buf3, buf2, 256, statFile);

0 commit comments

Comments
 (0)