OBD:BINA/OBJC/CMBT
|
|
|
File description
General settings
| Offset | Type | Raw Hex | Value | Description |
|---|---|---|---|---|
| 0x00 | char[4] | 43 4A 42 4F | OBJC | BINA subtype tag |
| 0x04 | uint32 | B0 0D 00 00 | 35628 | size of the complete list in bytes from this position |
| 0x08 | uint32 | 27 00 00 00 | 39 | object list version |
| 0x0C | uint32 | B4 00 00 00 | 180 | size of the following object in bytes |
| First object (black outline) | ||||
| 0x00 | char[4] | 54 42 4D 43 | CMBT | OBJC subtype tag |
| 0x04 | uint32 | 70 01 00 00 | 368 | object ID |
| 0x08 | uint32 | 00 00 00 00 | 0 | object flags |
| 0x0C | float | 13 55 5F C3 | -223.332321 | x position of handle |
| 0x10 | float | D4 A8 8E 41 | 17.832436 | y position of handle |
| 0x14 | float | C3 05 E9 C2 | -116.511253 | z position of handle |
| 0x18 | float | 00 00 00 00 | 0.000000 | x rotation of handle in degrees |
| 0x1C | float | 00 00 00 00 | 0.000000 | y rotation of handle in degrees |
| 0x20 | float | 00 00 00 00 | 0.000000 | z rotation of handle in degrees |
| 0x24 | char[64] | Stand_and_Fire | profile name | |
| 0x64 | uint32 | 00 00 00 00 | 0 | combat ID (looked up from BINACJBOCharacter) |
Behavior part
| Offset | Type | Raw Hex | Value | Description |
|---|---|---|---|---|
| 0x68 | uint32 | 02 00 00 00 | 2 | long range behavior; the following values are possible (values in dec):
|
| 0x6C | uint32 | 02 00 00 00 | 2 | medium range behavior; same possible values as above |
| 0x70 | uint32 | 02 00 00 00 | 2 | short range behavior (hand to hand behavior); same possible values as above |
| 0x74 | uint32 | 02 00 00 00 | 2 | medium retreat behavior; same possible values as above |
| 0x78 | uint32 | 02 00 00 00 | 2 | long retreat behavior; same possible values as above |
Combat part
| Offset | Type | Raw Hex | Value | Description |
|---|---|---|---|---|
| 0x7C | float | 00 00 F0 42 | 120.000000 | medium range threshold: the border between long and medium range; you can make it visible with ai2_showcombatranges = 1 |
| 0x80 | uint32 | 01 00 00 00 | 1 | melee override behavior; the following values are possible:
|
| 0x84 | uint32 | 00 00 00 00 | 0 | if no gun; behavior of AI which doesn't have a gun in its hand (but can have it holstered); the following values are possible:
|
| 0x88 | float | 00 00 20 42 | 40.000000 | short range threshold: the border between medium and short range; you can make it visible with ai2_showcombatranges = 1 |
| 0x8C | float | 00 00 48 43 | 200.000000 | pursuit distance; see below for info |
Non-combatant part
| Offset | Type | Raw Hex | Value | Description |
|---|---|---|---|---|
| 0x90 | uint32 | 58 02 00 00 | 600 | panic hurt (in ticks, 1/60 second) |
| 0x94 | uint32 | 84 03 00 00 | 900 | panic gunfire (in ticks) |
| 0x98 | uint32 | 58 02 00 00 | 600 | panic melee (in ticks) |
| 0x9C | uint32 | B0 04 00 00 | 1200 | panic sight (in ticks) |
Alarm part
| Offset | Type | Raw Hex | Value | Description |
|---|---|---|---|---|
| 0xA0 | float | 00 00 96 43 | 300.000000 | alarm search distance |
| 0xA4 | float | 00 00 A0 42 | 80.000000 | alarm enemy ignore distance |
| 0xA8 | float | 00 00 00 00 | 0.000000 | alarm enemy attack distance |
| 0xAC | uint32 | 1E 00 00 00 | 30 | alarm damage threshold |
| 0xB0 | uint32 | 68 01 00 00 | 360 | alarm fight timer |
These settings affect the behavior of an AI that's running for a console (e.g., script command ai2_doalarm). For an example of how flexible the AI is when using alarm behavior, see this demo from Loser where an AI completes Chapter 1.
- Pursuit distance
- This is the distance that the AI allowed to travel from its original location for pursuit purposes (see § About pursuit distance). Set it high enough and an AI can run through the whole level if it hears or spots something. Set it very low and the AI will take just a few steps in the direction of what disturbed them.
- Alarm search distance
- The radius around the AI where the engine checks if there is a console with the alarm flag set (see CONS).
- Alarm enemy ignore distance
- This one specifies an "ignore radius". Enemies which are inside this range are not actually ignored but the AI doesn't attack them.
- Alarm enemy attack distance
- Zero by default. This one specifies an "attack radius" around an AI who is running for an alarm. When there is an enemy inside it the AI stops running for the console and attacks the enemy (if AI knows about them, of course). Nevertheless the AI still keeps in mind that he should run for the console. So once there is no enemy inside this range and the fight timer runs out, the AI resumes running to the specified console.
- Fight timer
- When an AI which is running for the console is engaged in a fight and the enemy manages to disappear from sight, the AI tries to chase him or looks for him. The alarm timer specifies how long the AI should chase/look for the enemy. For chasing, the timer starts when the enemy is outside alarm enemy attack distance. Of course when the enemy escapes even from alarm enemy ignore distance the AI abandons him automatically.
- Alarm damage threshold
- Specifies how long an AI which is running for the console remembers someone hurt him. Until this timer runs out the AI doesn't try to use a console. It only stays in a fight stance near the console, ready to fight. If someone hurts the AI while he's running for the console and then escapes, but then moves towards him while this timer hasn't run down yet, the AI remembers him and takes the initiative to attack him the moment he steps inside alarm enemy attack distance.
Further info
Activating alarm behavior
Alarm logic can be tripped by:
- The ai2_doalarm command.
- The behavior flag Run For Alarm only enables alarm search distance. If there is no console with the alarm bit within reach, the AI stands still and just stares.
- The "if no gun" Run To Alarm behavior (which activates only when the AI is unarmed) also activates alarm search distance, but this time the AI can do normal actions (attack, hunt) if there is no alarm console within reach.
- Also see the pursuit mode settings in OBD:BINA/OBJC/CHAR.
About pursuit distance
First of all, pursuit is NOT when you have been seen and are now running away. If you do that, the AI is in combat mode, not pursuit mode. You are pursued only when you have not been seen by the AI's central vision field (see ONCC). So if an enemy of the AI makes a sound within the AI's sound detection sphere, or when the enemy enters the AI's peripheral vision field, the AI goes into pursuit mode. In this mode the AI uses a special behavior for investigating:
- None
- Forget
- GoTo
- Wait
- Look
- Move
- Hunt
- Glance
To learn about these, and the "lost contact" behaviors, see AI § Pursuit.
About melee override
First, a word about minimum shooting distance. This is a field in ONWC and determines the closest range at which an AI will fire his weapon. If the enemy comes closer the AI stops shooting and tends to run away until it reaches minimum shooting distance again. Now, if you set this minimum shooting distance higher than it is usually (for example, try 200) you can have some fun chasing AIs as they are running away from you.
The point is that if you set melee override to, e.g., Short Range, you will see that the moment you are closer than minimum shooting distance and you are within the range which activates it, the AI will switch to melee mode instead of running away.
So you can make the short range threshold, for example, 200 units in size and set minimum shooting distance to 100 units and have melee override Short Range, and the AI will shoot at you even if you are inside its short range – but the moment you enter minimum shooting distance it switches to melee.
Once you're outside of minimum shooting distance the AI decides switches back to its weapon. This seems to have a hardcoded time of somewhere between 120 and 300 ticks.
Dialogs from level0_Tools
| ONI BINARY DATA |
|---|
| AKVA << Other file types >> CBPI |
| BINA : Binary data |
| TMBD << Other BINA >> ONIE |
| OBJC : Objects |
| CHAR << Other OBJC >> CONS |
| CMBT : Combat profile |
| Level file |



