Jump to content
Sign in to follow this  
CamDawg

IWD cre files, secondary/tertiary death variables

Recommended Posts

These are actually the names of variables that get set when a creature dies. The first one, at 0x27e, gets set to 1. The second, at 0x29e, gets incremented by one. Both are GLOBALs. The regular script name at 0x2e8 can be used in the regular way and increments the SPRITE_IS_DEADfoo variable, just like BG2.

 

I think this is known already, but I didn't see it in the v9 creature file format page.

Share this post


Link to post

That's why we call them death variables.

 

Reference of the script name as "death variable" has been abolished, so the meaning of these two fields should obviously be obvious. :-)

Share this post


Link to post

I'm aware of that, yes. I figured the set v. increment were the new and interesting bits (and unlike the 'first' DV there's no prepended SPRITE_IS_DEAD).

Share this post


Link to post

This is extremely useful. I had Dead("hightort") misfire before; do I understand correctly that I had to check for GlobalGT("hightort","GLOBAL",0) instead?

Share this post


Link to post
This is extremely useful. I had Dead("hightort") misfire before; do I understand correctly that I had to check for GlobalGT("hightort","GLOBAL",0) instead?

If hightort is set as the script name/primary DV at 0x2e8, then a Dead("hightort") check should work. If it's set as the secondary or tertiary DV at 0x27e or 0x29e, then you need to check the global variable instead.

Share this post


Link to post

Future builds of NI will label these as "Death variable set" and "Death variable increment" now that I think about it, thanks.

Share this post


Link to post

New build up (JAR only for now). Also re-enables the animation list for IWD visual effect opcode (oops!), correctly recognizes IWD ARE actor names as valid script names again, and has an ugly (but seemingly functional) hack to prevent an exception when decompiling scripts with "" objects that have spaces in the name under IWD (apparently always broken in 1.33 betas).

Share this post


Link to post

In the next IESDP update, these are labelled as:

Secondary death variable (set to 1 on death)

Tertiary death variable (incremented by 1 on death)

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...