Added KnockoutTime option to change the duration of the knockout effect.

Fixed op_lookup_string_proc_ engine function not searching the last
procedure in a script.
This commit is contained in:
NovaRain
2019-07-04 12:11:00 +08:00
parent 5fa418ae08
commit f38d87e0ee
4 changed files with 11 additions and 3 deletions
+4
View File
@@ -665,6 +665,10 @@ SpecialDeathGVAR=491
;Note that enabling this option can break the map changes in Modoc and Vault 15
DisableSpecialMapIDs=0
;Changes the base value of the duration of the knockout effect (valid range: 35..100)
;The formula for the duration in ticks is: 10 * (value - 3 * EN)
KnockoutTime=35
;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
@@ -2751,4 +2751,7 @@ void BugFixesInit()
// Fix for combat not ending automatically when there are no hostile critters
MakeCall(0x422CF3, combat_should_end_hack);
SafeWrite16(0x422CEA, 0x0C74); // jz 0x422CF8 (skip party members)
// Fix for op_lookup_string_proc_ engine function not searching the last procedure in a script
SafeWrite8(0x46C7AC, 0x76); // jb > jbe
}
+1 -1
View File
@@ -1338,7 +1338,7 @@ void ScriptExtenderSetup() {
MakeCall(0x477A0E, item_identical_hack); // don't put item with unique ID to items stack
// Fix mapper bug by reassigning object IDs to critters (for maps not yet visited)
// Fix mapper bug by reassigning object IDs to critters (for unvisited maps)
MakeCall(0x482E6B, map_load_file_hack);
SafeWrite8(0x482E71, 0x85); // jz > jnz
+3 -2
View File
@@ -1162,8 +1162,7 @@ static void DllMain2() {
dlogr(" Done", DL_INIT);
}
int gvar = GetPrivateProfileIntA("Misc", "SpecialDeathGVAR", 491, ini); // GVAR_MODOC_SHITTY_DEATH
if (gvar != 491) SafeWrite32(0x440C2A, gvar);
SimplePatch<DWORD>(0x440C2A, "Misc", "SpecialDeathGVAR", 491); // GVAR_MODOC_SHITTY_DEATH
// Remove hardcoding for maps with IDs 19 and 37
if (GetPrivateProfileIntA("Misc", "DisableSpecialMapIDs", 0, ini)) {
@@ -1173,6 +1172,8 @@ static void DllMain2() {
dlogr(" Done", DL_INIT);
}
SimplePatch<DWORD>(0x424FA7, "Misc", "KnockoutTime", 35, 35, 100);
// Increase the max text width of the information card in the character screen
SafeWrite8(0x43ACD5, 144); // 136
SafeWrite8(0x43DD37, 144); // 133