Jump to content

New STATE.IDS entries (?)


Galactygon

Recommended Posts

A while back, Horred the Plague made a series of updates and tweaks to the STATE.IDS. There are a few states that found their way into the STATE.IDS file. Here is a complete list of what Horred found:

 

0x102029                   STATE_HARMLESS
0x80040004                 STATE_RANGED_TARGET
0x8014202d                 STATE_OUT_OF_ACTION
0x400010                   STATE_NOT_VISIBLE
0x60400010                 STATE_ILLUSIONS
0x63c08010                 STATE_ENCHANTED

 

Now, some of these seem self-explanatory (although I haven't really tested these), but the rest, I have no clue what they really check for. Since Horred was absent from the IE modding scene for months, I realized posting this here won't do much bad.

 

It might also not hurt to have a brief description of each IDS file and perhaps each IDS entry in the IESDP (If they are customizable, then state so, such as RACE.IDS).

 

-Galactygon

 

-Galactygon

Link to comment

These are not new, per se. New states can be created by adding together existing ones--for example, Horred's STATE_NOT_VISIBLE is just a combo of 0x00000010 STATE_INVISIBLE and 0x00400000 STATE_IMPROVEDINVISIBILITY. I add 0x80101FEF CD_STATE_NOTVALID to STATES.ids so I can use a !StateCheck as an alternative for the broken IsValidForPartyDialogue. :rolleyes:

Link to comment

Since States are defined by a dword (32 bits) and all possible bits are already used, you can only get 'new' states by combining existing bits. As noted by others, you can do this for more efficient scripting.

 

How exactly is IsValidForPartyDialog broken? I assume it has something to do with the character's current state, as the only time I've seen it not work (while paying attention anyway) is if the character being checked is the one involved in the conversation. (i.e., the NPC initiated dialog with someone other than Player1.)

Link to comment

0x102029                   STATE_HARMLESS
0x80040004                 STATE_RANGED_TARGET
0x8014202d                 STATE_OUT_OF_ACTION
0x400010                   STATE_NOT_VISIBLE
0x60400010                 STATE_ILLUSIONS
0x63c08010                 STATE_ENCHANTED

 

Xyx came up with the combinations many moons ago in a galaxy now under water.

 

I've got a little table of them somewhere to remind me exactly what combines with what. I'll see if I can find it an post it.

 

Jon Olav was also nice enough to modify NI's compiler so that you could combine the states without having to create your own custom ones. IIRC it went something like

 

!CheckState(Myself,STATE_POISON | STATE_STUN | STATE_SLEEPING) etc.,.

Link to comment

You still need custom states for dialog scripts. NI won't, at present, auto-combine state values when editing state and transition triggers. I don't think WeiDU does either.

 

I've been thinking of a replacement for IVFPD that would work in a massive WeiDU dialog edit.

 

IsValidForPartyDialog("NPC") would become

 

InParty("NPC")

!StateCheck("NPC",STATE_NO_DIALOG)

Detect("NPC")

 

!IsValidForPartyDialog("NPC") would become

 

OR(3)

!InParty("NPC")

StateCheck("NPC",STATE_NO_DIALOG)

!Detect("NPC")

 

and STATE_NO_DIALOG would be a value of 0x8010382F, or a combination of

 

0x00000001 STATE_SLEEPING

0x00000002 STATE_BERSERK

0x00000004 STATE_PANIC

0x00000008 STATE_STUNNED

0x00000020 STATE_HELPLESS

0x00000800 STATE_DEAD

0x00001000 STATE_SILENCED

0x00002000 STATE_CHARMED

0x00100000 STATE_FEEBLEMINDED

0x80000000 STATE_CONFUSED

 

If there's a bug that prevents the death state from being detected this way, then I'd have to add Dead("NPC") or !Dead("NPC") to the above code. I chose Detect() to allow non-visible (either by spell or because of a doorway or other obstruction) characters to speak, but to disallow characters that are otherwise valid but too far away (off screen). This combination would allow an NPC to interject even if they are the current gabber. Line of sight isn't an issue with Detect(), that I know of. Thoughts?

Link to comment

Archived

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

×
×
  • Create New...