OBD:BINA/OBJC/CONS

From OniGalore
< OBD:BINA‎ | OBJC
This is about console instances. For the console class resource, see OBD:CONS
ONI BINARY DATA
AKVA << Other file types >> CBPI
BINA : Binary data
TMBD << Other BINA >> ONIE
OBJC : Objects
CMBT << Other OBJC >> DOOR
CONS : Console
XML tutorial
Overview @ Oni Stuff
OBD.png


Bin r co.gif


Offset Type Raw Hex Value Description
0x000 char[4] 43 4A 42 4F OBJC objects
0x004 int32 4C 0E 00 00 5463 size of the complete console part from this position in bytes
0x008 int32 27 00 00 00 39 object list version
0x00C int32 48 01 00 00 328 size of the following element in bytes
First element (black outline)
Generic object data
0x000 char[4] 53 4E 4F 43 CONS console
0x004 int32 57 12 00 00 5463 object ID
0x008 int32 08 00 00 00 8 object flags; only used at runtime in Tool mode
0x00C float 71 0C 6C 44 944.194396 x position of the console
0x010 float 00 00 D8 C1 -27.000000 y position (height) of the console
0x014 float 68 05 EB 41 29.377639 z position of the console
0x018 float 42 FD 17 38 0.000036 rotation on the x axis in degrees
0x01C float 00 00 87 43 270.000000 rotation on the y axis in degrees
0x020 float 00 00 00 00 0.000000 rotation on the z axis in degrees
Object-specific data
0x024 char[63] console_data console class name (reference to 00761-console_data.CONS of level 0)
0x063 int16 01 00 1 console ID
0x065 bitset16 08 00 8 console options; the following bits are possible:
0x01 - runtime: "initialized"; never used
0x02 - runtime: console has been used
0x04 - runtime: console is active (can be used); occurs when console_activate is called, or by calling console_reset if the "initially active" flag is set
0x08 - initially active
0x10 - runtime: "new"; never used
0x20 - punch animation: Konoko will use TRAMKONOKOconsole_punch, a slow punch animation; not used in-game, probably meant to destroy a console
0x40 - alarm console flag; AI can search for the console and use it on its own (no scripting required) when certain conditions (CMBT alarm behavior) are met
0x067 char[63] _con_INFO "console deactivated" texture name (reference to 00800-_CON_INFO.TXMP of level 0)
0x0A6 char[63] _con_INFO "console activated" texture name (reference to 00800-_CON_INFO.TXMP of level 0)
0x0E5 char[63] _con_INFO "console used" texture name (reference to 00800-_CON_INFO.TXMP of level 0)
0x124 int16 01 00 1 number of events
First event (grey outline)
0x126 int16 01 00 1 event type; the following values are used in the vanilla game data (see "Events" below for all values):
01 - script function
04 - activate console
06 - activate alarm
08 - activate trigger
09 - deactivate trigger
11 - unlock door
0x128 char[32] level3c event parameter; here, the name of the script function to be called when the console is used

Events

Three OBJC types can trigger an event: a console when activated, a door when opened, and a trigger laser when tripped. This is the full set of event types they can execute:

1 - call script function
2 - activate turret
3 - deactivate turret
4 - activate console
5 - deactivate console
6 - activate alarm
7 - deactivate alarm
8 - activate trigger
9 - deactivate trigger
10 - lock door
11 - unlock door

This allows all sorts of odd combinations, e.g. a trigger laser could activate another trigger laser or unlock a door, but Oni never does anything that unusual in the vanilla game data.

The data size of the parameter assigned to each of these events is a 2-byte int, except for "call script function" which provides space for a 32-byte string.

Tool Mode dialog

Tool dialog - Console Properties.png


ONI BINARY DATA
AKVA << Other file types >> CBPI
BINA : Binary data
TMBD << Other BINA >> ONIE
OBJC : Objects
CMBT << Other OBJC >> DOOR
CONS : Console
Level file