Guard data refers to 0x1DC of data used to store specific information relating to a particular guard. The name is a bit of a misnomer; players also have guard data of their own in addition to player data, but not all the fields are utilized.
A pointer to the guard data list can be found at the address 8002CC64.
The Data and Its Use Edit
Many action types affect one or more of the entires in guard data. Guard bitflags are stored in this area as well. Fields marked unknown have not yet been identified. Given is the offset to each data, in hexadecimal, as well as its size and function if known.
Guard ID Edit
Offset 0x2, 1 byte.
Offset 0x3, 1 byte.
Rounds Fired from Right Weapon Edit
Offset 0x4, 1 byte. A count of the number of rounds fired from the weapon in the right hand.
Rounds Fired from Left Weapon Edit
Offset 0x5, 1 byte. A count of the number of rounds fired from the weapon in the left hand.
Offset 0x6, 1 byte. The head model currently attached to the character.
Current Action Type Edit
Offset 0x7, 1 byte. Each action has a specific action type assigned to it. This indicates what kind of action the character is performing. It can also be used to trigger the designated action if no other is being performed.
- 1 standing
- 2 freeze guard animation...
- 3 wasting time (ie. swatting flies)
- 4 dying
- 5 fade-away (removed)
- 6 getting shot
- 7 limping sort of animation
- 8 firing (standstill)
- 9 firing (walking)
- A firing (running or rolling)
- B step to side
- C hop to side
- D run to side
- E walk along path
- F moving (any speed)
- 10 surrendering
- 11 freeze guard animation...
- 12 look around self
- 13 trigger alarm (activate object)
- 14 throwing grenade
Offset 0x8, 1 byte.
Offset 0x9, 1 byte.
Number of Shots Near Guard Edit
Offset 0xA, 1 byte. The number of shots that have been fired within close proximity of the guards, such as over their head.
Number of Times Guard has been Shots Edit
Offset 0xB, 1 byte. The number of shots that have struck the guard.
Offset 0xC, 1 byte.
Offset 0xD, 1 byte. Possibly a factor in accuracy.
Offset 0xF, 1 byte. The model number of the guard's body.
Offset 0x10, 1 byte. A special value used in probability tests. The higher the value is, the more likely it is that certain actions will occur, such as throwing grenades.
Offset 0x11, 1 byte.
Guard Mode Flags Edit
- 0200 enable walking on a path
- 0100 set when the position pointer is invalid
- 0040 enables the loop counter for actions
- 0020 eliminate guard
Guard Bitflags Edit
- 00200000 Shot/shot at register; Unset by action F8
- 00100000 Mark as civilian
- 00000010 Unknown; marked on Doak from Facility
- 00000008 Has been on-screen at some point
- 00000004 Invisible; used by action DD to remove characters from play
- 00000002 Currently performing an action
- 00000001 Use sunglasses when applicable
Position Data Pointer Edit
Model Data Pointer Edit
Offset 0x24, 4 bytes.
Offset 0x28, 4 bytes.
Offset 0x2C, 4 bytes. Normally 0. Set to -1 (0xFFFFFFFF) when the guard is fading away. This may very well be a fading counter, similar to the stage timer.
Offset 0x44, 4 bytes.
Offset 0x48, 4 bytes.
Movement Register Edit
Offset 0x4C, 4 bytes. Set to zero when the character is moving towards a point. When standing still, set to 1.
Offset 0x50, 4 bytes.
Offset 0x54, 4 bytes.
Type of Motion Edit
Offset 0x58, 1 byte. Details unknown.
Distance Counter Edit
Offset 0x59, 1 byte. A counter used to determine the distance required to travel to a given destination. When the target has been reached, the counter will be at zero.
Distance to Target Edit
X Position Edit
Y Position Edit
Z Position Edit
Offset 0xC8, 4 bytes.
Offset 0xCC, 4 bytes.
Reaction Time Edit
Hearing Ability Edit
Offset 0xEC, 4 bytes. A four-byte floating-point number. How easily the guard notices gunfire. Specificly, multiplies this value versus the combined sound value of the gunshots, and alarms the guard if the value is too high.
Damage Received Edit
Offset 0x100, 4 bytes. A four-byte floating-point number. The total health of the character. This value does not change when damage is recieved. When damage is higher than the health value, the character is killed.
Action Block Pointer Edit
Offset within Action Block Edit
Offset 0x108, 2 bytes. This value is added to the action block pointer to determine the current command to execute.
Action Block Return Pointer Edit
User Byte #1 Edit
User Byte #2 Edit
Type Designation Edit
Offset 0x10E, 1 byte. A bitflag field that denotes what kind of character this is.
- 80 scientist/civilian
Random Value Edit
Offset 0x10F, 1 byte. Register used to set a randomly-generated value unique for this character.
Loop Counter Edit
2328 Preset Edit
Offset 0x114, 2 bytes. The preset of an object the character has been set to interact with. Use the value 2328 as a preset in order to recall the value.
FC Preset Edit
FA Preset Edit
Offset 0x118, 2 bytes. This is automatically set to teh ID of a guard when they are visibily killed in front of this character. The ID is cleared automatically.
FB Preset Edit
Offset 0x11A, 2 bytes. This is automaticaly set to the ID of a guard when they are visibly shot in fornt of this character. The ID is cleared automatically.