Jump to content

Unknown bytes in IWD CRE v9.0


devSin

Recommended Posts

I somehow decided to play IWD again some time ago. During the course of the game, I decided to check a few things that seemed really screwy:

 

In Dragon's Eye, in the level with Mother Egenia and the Talonites, the captive villagers never acknowledge that the priests are dead and Mother Egenia is saved. I looked, and the dialogues check a mysterious variable that I couldn't see was set *anywhere* in the game scripts and dialogues.

 

So, running over to the CRE file for the Talonite priests, and found this tidbit: in the unknown field (corresponding to the IESDP 0x0270 : 104 (bytes) : Unknown), there was some relevant data. In hex:

00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 61 6c 6f 6e 69 74 65 5f 44 65 61 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

As seen, there are two values at offsets 0x01 and 0x02 (this could be one or two integral values, or data in a bit field, I guess). The data in the middle is the ASCII value for the mysterious variable ("Talonite_Dead"). An Icewind Dale saved game routinely has dual "death variables" (the normal SPRITE_IS_DEAD, and a descriptive <string>_Dead or other string), and running through some other CREs shows that similar data is contained in this chunk of bytes (Mother Egenia herself, for instance, has KILL_INNOCENT here).

 

Somehow, the data in here causes the engine to set variables based on the creature state (for the Talonites, the scripts are supposed to check Talonite_Dead > 9 -- when the four Talonite priests in the area are slain, this value gets set to 10 (as far as I can tell, there are only four priests, so I'm not sure how it gets to the value 10, unless this is a bit value)). I'm not sure if this only works on death (it seems to be the only use, from what I've checked), or if there's some data that can be manipulated at other times (perhaps pertaining to creature states, or on creation or somesuch).

 

Anyway, since the modding community holds the IWD series in such high regard, I thought I'd throw this out here for some curious soul to investigate (now that the easy part is done). For posterity, the villagers don't respond because they're *all* checking for Talonites_Dead, and the temporary head priestess in Kuldahar doesn't ever notice that you save Egenia because she's checking Talonite_Dead = 4 (should be 10).

 

If you're considering playing IWD again, I'd reconsider. It didn't seem to me to be as much fun, nor as visually appealing, as I remembered.

Link to comment

Yes, i saw this field as well, and could confirm that it is a second death variable.

I have not checked if it is increased correctly.

 

I think there are more talonites all around the area with that variable to set.

Or the variable is increased more than once.

 

Your info that 'sprite_is_dead$$$' variables are still set is valuable, as i was planning to override the death variable with this value.

Link to comment

Yeah, the normal death variables are set, but are rarely (if ever) used in the game.

 

I think those are the only Talonites in the area (the first level consists entirely of spiders and lizard men), so I don't know how the value gets to 10. The rest of the level consists of trolls and beetles.

 

It could be that more Talonites are spawned in, but this isn't really ever done in IWD (all creatures usually exist already, and are either hidden or shown).

Link to comment

I found instances of creatures being spawned in via ARxxx.INI files, or similarly named (don't have IWD installed atm.) A case in point is the ghosts that spawn in the outdoor map with caves, one of which leads to Kresselak; the spawning is governed by the INI file, at least in part.

Link to comment

That's all the area ini files do (they set up and control everything related to random spawns). These are just usual random monster spawns, however, and never plot-related. For instance, this is the INI file for AR4002 (the area in question):

[locals]

[spawn_main]
events=8_HOURS

[8_HOURS]
critters=TROLL1,TROLL2,TROLL3,TROLL4,TROLL5,TROLL6
interval=432000


[TROLL1]
spec                    = [255.0.0.0.150]
spec_var  = 4002_SPAWN
spec_qty                = 1
cre_file                = TROLL
create_qty              = 1
ai_specifics     	 = 150
spawn_point             = [3040.1330]

[TROLL2]
spec                    = [255.0.0.0.151]
spec_var  = 4002_SPAWN
spec_qty                = 1
cre_file                = TROLL
create_qty              = 1
ai_specifics     	 = 151
spawn_point             = [2500.2120]

[TROLL3]
spec                    = [255.0.0.0.152]
spec_var  = 4002_SPAWN
spec_qty                = 1
cre_file                = TROLL
create_qty              = 1
ai_specifics     	 = 152
spawn_point             = [1170.0820]

[TROLL4]
spec                    = [255.0.0.0.153]
spec_var  = 4002_SPAWN
spec_qty                = 1
cre_file                = TROLL
create_qty              = 1
ai_specifics     	 = 153
spawn_point             = [0560.0400]

[TROLL5]
spec                    = [255.0.0.0.154]
spec_var  = 4002_SPAWN
spec_qty                = 1
cre_file                = TROLL
create_qty              = 1
ai_specifics     	 = 154
spawn_point             = [0930.1740]

[TROLL6]
spec                    = [255.0.0.0.155]
spec_var  = 4002_SPAWN
spec_qty                = 1
cre_file                = TROLL
create_qty              = 1
ai_specifics     	 = 155
spawn_point             = [0320.2310]

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...