PST Identifiers
Relates to offset 0x0020 in the .cre file format.
Used by the StateCheck(O:Object*,I:State*State) trigger.
The file is partially extensible; new states cannot be created though existing states can be combined to create shortcut states. Sum their values together to get the value of the new state. When combining with states that are themselves combinations, it is safer to use bitwise OR instead of summation.
The norm is to keep the value in hexadecimal format, so it is easier to see if it is a combination state and which other states it is made of.
In other words, STATEs are cumulative: all those STATEs that aren't a power of 2 (only one bit set) are combinations of other STATEs. In particular, you can BOR (bitwise OR) the base STATEs (i.e., all those listed at offset 0x0020 of a CRE file) to form all the others. For instance, STATE_HARMLESS is STATE_FEEBLEMINDED | STATE_CHARMED | STATE_IMMOBILE... and STATE_IMMOBILE is STATE_HELPLESS | STATE_STUNNED | STATE_SLEEPING.
33
0x00000000 CGAMESPRITE_STATE_NORMAL
0x00000001 CGAMESPRITE_STATE_SLEEPING
0x00000002 CGAMESPRITE_STATE_BERSERK
0x00000004 CGAMESPRITE_STATE_PANIC
0x00000008 CGAMESPRITE_STATE_STUNNED
0x00000010 CGAMESPRITE_STATE_CURSE
0x00000020 CGAMESPRITE_STATE_HELPLESS
0x00000040 CGAMESPRITE_STATE_FROZEN_DEATH
0x00000080 CGAMESPRITE_STATE_STONE_DEATH
0x00000100 CGAMESPRITE_STATE_MIRRORIMAGE
0x00000200 CGAMESPRITE_STATE_FLAME_DEATH
0x00000400 CGAMESPRITE_STATE_ACID_DEATH
0x00000800 CGAMESPRITE_STATE_DEAD
0x00001000 CGAMESPRITE_STATE_SILENCED
0x00002000 CGAMESPRITE_STATE_CHARMED
0x00004000 CGAMESPRITE_STATE_POISONED
0x00008000 CGAMESPRITE_STATE_CRITICAL_PROTECTION
0x00010000 CGAMESPRITE_STATE_CRITICAL_ENHANCEMENT
0x00020000 CGAMESPRITE_STATE_INFRAVISION
0x00040000 CGAMESPRITE_STATE_BLIND
0x00080000 CGAMESPRITE_STATE_DISEASED
0x00100000 CGAMESPRITE_STATE_FEEBLEMINDED
0x00200000 CGAMESPRITE_STATE_NONDETECTION
0x00400000 CGAMESPRITE_STATE_EE_DUPLICATION
0x00800000 CGAMESPRITE_STATE_BLESS
0x01000000 CGAMESPRITE_STATE_DETECT_EVIL
0x02000000 CGAMESPRITE_STATE_INVISIBLE
0x04000000 CGAMESPRITE_STATE_LUCK
0x08000000 CGAMESPRITE_STATE_AID
0x10000000 CGAMESPRITE_STATE_ANTIMAGIC
0x20000000 CGAMESPRITE_STATE_BLUR
0x40000000 CGAMESPRITE_STATE_EMBALMING
0x80000000 CGAMESPRITE_STATE_CONFUSED