Jump to content
Sign in to follow this  
lynx

Heart of Fury / nightmare mode

Recommended Posts

The recent discussion with Endurium and digging through the archives made me wonder how HoF is persisted. It's enabled by an ini option, but once a game is started, it is HoF forever, so the information must be saved somewhere. It'd be natural to have it in the saved GAM, so I started a new iwd2 game and saved, then enabled HoF and did the same.

iediff showed these differences, but only one stood out — I suspect HoF mode is toggled by what is "Saved locations offset" at 0x6c of the GAM header in IESDP (and that it just didn't have it):

Spoiler

$ ./iediff "/media/kajak/games/iwd2-2/mpsave/000000062-lament nonhof/ICEWIND2.GAM" "/media/kajak/games/iwd2-2/mpsave/000000063-lament hof/ICEWIND2.GAM"  | cat
--- /dev/fd/63  2019-10-18 22:23:42.676717780 +0200
+++ /dev/fd/62  2019-10-18 22:23:42.676717780 +0200
@@ -7,7 +7,7 @@
 Formation button[2]: 1 
 Formation button[3]: 9 
 Formation button[4]: 5 
-Party gold: 136 
+Party gold: 144 
 Unknown / PC count: 5 
 Weather: 0 ()
 PC offset: 180 
@@ -27,7 +27,7 @@
 GUI flags: 0 ()
 Unknown / Loading progress: 3 (XNEWAREA.2DA processing to be done)
 Familiar info offset: 20224 
-Stored locations offset: 0 
+Stored locations offset: 1 
 Stored locations count: 0 
 Game time (real seconds): 0 
 Pocket plane locations offset: 0 
@@ -45,7 +45,7 @@
 X coordinate: 2414 
 Y coordinate: 897 
 Viewing rectange X coordinate: 2013 
-Viewing rectangle Y coordinate: 648 
+Viewing rectangle Y coordinate: 649 
 Modal action: 0 
 Happiness: 0 
 Num times interacted NPC count (unused)[0]: 0 
@@ -166,7 +166,7 @@
 CRE size: 0 
 Character name:  
 Orientation: 0 
-Current area:  
+Current area:  
 X coordinate: 7534 
 Y coordinate: 0 
 Viewing rectange X coordinate: 2346 
@@ -178,7 +178,7 @@
 Num times interacted NPC count (unused)[2]: 808538689 
 Num times interacted NPC count (unused)[3]: 12336 
 Num times interacted NPC count (unused)[4]: 60688657 
-Num times interacted NPC count (unused)[5]: 42469341 
+Num times interacted NPC count (unused)[5]: 42534877 
 Num times interacted NPC count (unused)[6]: 0 
 Num times interacted NPC count (unused)[7]: 0 
 Num times interacted NPC count (unused)[8]: 0 
@@ -303,7 +303,7 @@
 Num times interacted NPC count (unused)[0]: 0 
 Num times interacted NPC count (unused)[1]: 0 
 Num times interacted NPC count (unused)[2]: 0 
-Num times interacted NPC count (unused)[3]: 131073 
+Num times interacted NPC count (unused)[3]: 131072 
 Num times interacted NPC count (unused)[4]: 9880 
 Num times interacted NPC count (unused)[5]: 2322 
 Num times interacted NPC count (unused)[6]: 0 
@@ -312,7 +312,7 @@
 Num times interacted NPC count (unused)[9]: 808538689 
 Num times interacted NPC count (unused)[10]: 12336 
 Num times interacted NPC count (unused)[11]: 61016399 
-Num times interacted NPC count (unused)[12]: 42469341 
+Num times interacted NPC count (unused)[12]: 42534877 
 Num times interacted NPC count (unused)[13]: 0 
 Num times interacted NPC count (unused)[14]: 0 
 Num times interacted NPC count (unused)[15]: 0 
@@ -435,7 +435,7 @@
 Num times interacted NPC count (unused)[7]: 0 
 Num times interacted NPC count (unused)[8]: 0 
 Num times interacted NPC count (unused)[9]: 0 
-Num times interacted NPC count (unused)[10]: 196609 
+Num times interacted NPC count (unused)[10]: 196608 
 Num times interacted NPC count (unused)[11]: 12202 
 Num times interacted NPC count (unused)[12]: 2658 
 Num times interacted NPC count (unused)[13]: 0 
@@ -444,7 +444,7 @@
 Num times interacted NPC count (unused)[16]: 808538689 
 Num times interacted NPC count (unused)[17]: 12336 
 Num times interacted NPC count (unused)[18]: 56822095 
-Num times interacted NPC count (unused)[19]: 42469341 
+Num times interacted NPC count (unused)[19]: 42534877 
 Num times interacted NPC count (unused)[20]: 0 
 Num times interacted NPC count (unused)[21]: 0 
 Num times interacted NPC count (unused)[22]: 0 
@@ -567,7 +567,7 @@
 Num times interacted NPC count (unused)[14]: 0 
 Num times interacted NPC count (unused)[15]: 0 
 Num times interacted NPC count (unused)[16]: 0 
-Num times interacted NPC count (unused)[17]: 262145 
+Num times interacted NPC count (unused)[17]: 262144 
 Num times interacted NPC count (unused)[18]: 14860 
 Num times interacted NPC count (unused)[19]: 2658 
 Num times interacted NPC count (unused)[20]: 0 
@@ -579,7 +579,7 @@
 Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[2]: 2351 
 Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[3]: 894 
 Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[4]: 2013 
-Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[5]: 648 
+Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[5]: 649 
 Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[6]: 0 
 Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[7]: 0 
 Is the quick weapon slot usable?[0]: 0 
@@ -699,7 +699,7 @@
 Num times interacted NPC count (unused)[21]: 0 
 Num times interacted NPC count (unused)[22]: 0 
 Num times interacted NPC count (unused)[23]: 0 
-Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[0]: 1 
+Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[0]: 0 
 Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[1]: 5 
 Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[2]: 17518 
 Index into slots.ids for main Quick Weapon or offhand, interchanging (FFFF=none)[3]: 0 
@@ -715,7 +715,7 @@
 Is the quick weapon slot usable?[5]: 12337 
 Is the quick weapon slot usable?[6]: 12336 
 Is the quick weapon slot usable?[7]: 0 
-Quick spell resource[0]: ▒     S�� 
+Quick spell resource[0]: ▒     S�� 
 Quick spell resource[1]:  
 Quick spell resource[2]:  
 Quick spell resource[3]:

 

I haven't tried to verify this though. I guess the easiest way would be to set it back to 0, move to a new master area and see if the enemies are beefed up or not.

 

Share this post


Link to post

I did some testing.

Setting the value in the config INI only has effect when creating a new game. It is ignored for currently saved game sessions.

Setting the value in the config INI to zero (disable) afterward, has no effect on HoF/Nightmare saves because of the save variable being set (below) in the saved GAM file.

GAM V2.2 offset 0x6C = 1 in HoF/Nightmare Mode, 0 at all other times.

Setting it to zero in a HoF save will disable HoF/Nightmare and allow modification of the Difficulty slider, but creatures spawned in areas in the associated SAV file will retain their buffed stats. Using NI I deleted AR1000 from the HoF quick save, loaded it and saved it to test SAV, and the creatures were back to normal stats.

Conversely, setting the HoF flag (0x6C) to 1 in a non-HoF game file enables HoF mode, and creatures in the next master area will spawn with enhanced stats.

As a side note, your diff data seems to be based on BG2/EE GAM file. Offset 0x6C is only used in GAM 1.1 (PST) and GAM 2.0 but is undefined in GAM 2.2. IWD2 has the actor's saved location in its CRE (V2.2) files.

Edited by Endurium

Share this post


Link to post

I was using the current iesdp description of the format. I guess it was copied over from bg2 as a starting point. iesh didn't have it either, so I added it yesterday just for this investigation.

Thanks for the verification!

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...