BG1: TotS 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.

0x00000000 STATE_NORMAL
0x800 STATE_DEAD
0x400 STATE_ACID_DEATH
0x200 STATE_FLAME_DEATH
0x100 STATE_EXPLODING_DEATH
0x80 STATE_STONE_DEATH
0x40 STATE_FROZEN_DEATH
0x20 STATE_HELPLESS
0x10 STATE_INVISIBLE
0x8 STATE_STUNNED
0x4 STATE_PANIC
0x2 STATE_BERSERK
0x1 STATE_SLEEPING
0x1000 STATE_SILENCED
0x2000 STATE_CHARMED
0x4000 STATE_POISONED
0x8000 STATE_HASTED
0x10000 STATE_SLOWED
0x20000 STATE_INFRAVISION

0x40000 STATE_BLIND
This state indicates whether the creature is currently blinded.

0x80000 STATE_DISEASED
Contrary to the name, this state does not mark disease, instead it marks the state of the creature as set by Activate/Deactivate.

0x100000 STATE_FEEBLEMINDED
0x200000 STATE_NONDETECTION
0x400000 STATE_IMPROVEDINVISIBILITY
0x800000 STATE_BLESS
0x1000000 STATE_CHANT
0x2000000 STATE_DRAWUPONHOLYMIGHT
0x4000000 STATE_LUCK
0x8000000 STATE_AID
0x10000000 STATE_CHANTBAD
0x20000000 STATE_BLUR
0x40000000 STATE_MIRRORIMAGE
0x80000000 STATE_CONFUSED


Common shortcut states include:
0x00102029 STATE_HARMLESS
Feeblemind & Charmed & Helpless & Stunned & Sleeping

0x80040004 STATE_RANGED_TARGET
Blind & Confused & Panic

0x8014202D STATE_OUT_OF_ACTION
Feeblemind & Charmed & Helpless & Stunned & Sleeping & Blind & Confused & Panic

0x00400010 STATE_NOT_VISIBLE
Invisibility & Improved Invisibility

0x63C08010 STATE_ENCHANTED
Mirror Image & Chant & Haste & Aid & Improved Invisibility

0x60400010 STATE_ILLUSIONS
Invisible & Improved Invisibility & Mirror Image

0x8000380F STATE_INVALID
Confused & Charmed & Silenced & Dead & Stunned & Panic & Berserk & Sleeping