OBD:BINA/OBJC/CONS: Difference between revisions

explained flags; added Events section
No edit summary
(explained flags; added Events section)
 
(20 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File types]] >> [[OBD:BINA|BINA]] >> Console.BINA
:''This is about console instances. For the console class resource, see [[OBD:CONS]]
{{OBD OBJC Header | align=center | type=CONS | prev=CMBT | next=DOOR | name=Console | stuff=b_co}}




<CENTER>[[OBD:BINA/Character|<==]] <FONT SIZE=5>Console.BINA</FONT> [[OBD:BINA/Door|==>]]</CENTER>
[[Image:bin_r_co.gif]]




http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/bin_r_co.gif
{{Table}}
{{OBDth}}
{{OBDtr| 0x000 | char[4]  |FF0000| 43 4A 42 4F | OBJC      | objects }}
{{OBDtr| 0x004 | int32    |FFFF00| 4C 0E 00 00 | 5463      | size of the complete console part from this position in bytes }}
{{OBDtr| 0x008 | int32    |00FF00| 27 00 00 00 | 39        | object list version }}
{{OBDtr| 0x00C | int32    |00FFFF| 48 01 00 00 | 328      | size of the following element in bytes }}
{{OBDtrgroup}}
{{OBDtrsubgroup}}
{{OBDtr| 0x000 | char[4]  |FFC8C8| 53 4E 4F 43 | CONS      | console }}
{{OBDtr| 0x004 | int32    |FFFFC8| 57 12 00 00 | 5463      | object ID }}
{{OBDtr| 0x008 | int32    |C8FFC8| 08 00 00 00 | 8        | object flags; only used at runtime in Tool mode }}
{{OBDtr| 0x00C | float    |C8FFFF| 71 0C 6C 44 | 944.194396| x position of the console }}
{{OBDtr| 0x010 | float    |C8FFFF| 00 00 D8 C1 | -27.000000| y position (height) of the console }}
{{OBDtr| 0x014 | float    |C8FFFF| 68 05 EB 41 |  29.377639| z position of the console }}
{{OBDtr| 0x018 | float    |FFC8FF| 42 FD 17 38 |  0.000036| rotation on the x axis in degrees }}
{{OBDtr| 0x01C | float    |FFC8FF| 00 00 87 43 | 270.000000| rotation on the y axis in degrees }}
{{OBDtr| 0x020 | float    |FFC8FF| 00 00 00 00 |  0.000000| rotation on the z axis in degrees }}
{{OBDtrsubgroup|end}}
{{OBDtr2|0x024 | char[63] |FFC800| console_data            | console class name (reference to 00761-console_data.[[OBD:CONS|CONS]] of level 0) }}
{{OBDtr| 0x063 | int16    |C800C8| 01 00      | 1        | console ID }}
{{OBDtr| 0x065 | bitset16 |C87C64| 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 <tt>[[console_activate]]</tt> is called, or by calling <tt>[[console_reset]]</tt> 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 ([[OBD:BINA/OBJC/CMBT#Alarm part|CMBT]] alarm behavior) are met
}}
{{OBDtr2|0x067 | char[63] |B0C3D4| _con_INFO              | "console deactivated" texture name (reference to 00800-_CON_INFO.[[OBD:TXMP|TXMP]] of level 0) }}
{{OBDtr2|0x0A6 | char[63] |E7CEA5| _con_INFO              | "console activated" texture name (reference to 00800-_CON_INFO.TXMP of level 0) }}
{{OBDtr2|0x0E5 | char[63] |FFDDDD| _con_INFO              | "console used" texture name (reference to 00800-_CON_INFO.TXMP of level 0) }}
{{OBDtr |0x124 | int16    |64AAAA| 01 00      | 1        | number of events }}
{{OBDtrgroup|1=First event (grey outline)}}
{{OBDtr |0x126 | int16    |EBEBEB| 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
}}
{{OBDtr2|0x128 | char[32] |8C8CCC| 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 [[OBD:BINA/OBJC/CONS|console]] when activated, a [[OBD:BINA/OBJC/DOOR|door]] when opened, and a [[OBD:BINA/OBJC/TRIG|trigger laser]] when tripped. This is the full set of event types they can execute:


{| width="100%" cellspacing="1" cellpadding="2" bgcolor="#000000" border=1
:1 - call script function
|- bgcolor="#FFDDBB" align="CENTER"
:2 - activate turret
| width="15%" | '''Hex'''
:3 - deactivate turret
| width="15%" | '''Translation'''
:4 - activate console
| width="70%" | '''Meaning'''
:5 - deactivate console
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:6 - activate alarm
| bgcolor="#FF0000" | 43 4A 42 4F
:7 - deactivate alarm
| OBJC
:8 - activate trigger
| align="LEFT" | object
:9 - deactivate trigger
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:10 - lock door
| bgcolor="#FFFF00" | 4C 0E 00 00
:11 - unlock door
| 3660
 
| align="LEFT" | 3660 bytes is the length of the following console part from this position
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.
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
 
| bgcolor="#00FF00" | 27 00 00 00
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.
| 39
 
| align="LEFT" | identification number for the weapon classes; in every level the same; do not change it
;Tool Mode dialog
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#00FFFF" | 48 01 00 00
| 328
| align="LEFT" | 328 bytes (20.5 lines) is the lenght of the following package (area edged in black)
|- bgcolor="#000000" align="CENTER" valign="TOP"
| colspan="3" | <font size="2" color="#FFFFFF">Below follows the first package.</font>
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8C8" | 53 4E 4F 43
| CONS
| align="LEFT" | console
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFFFC8" | 57 12 00 00
| 5463
| align="LEFT" | old file ID
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 08 00 00 00
| 8
| align="LEFT" | unknown
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFFF" |
71 0C 6C 44
| 944.194396
| align="LEFT" | x-position of the spawn point of the console
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFFF" | 00 00 D8 C1
| -27.000000
| align="LEFT" | y-position (height) of the spawn point of the console
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFFF" | 68 05 EB 41
| 29.377639
| align="LEFT" | z-position of the spawn point of the console
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | 42 FD 17 38
| 0.000036
| align="LEFT" | rotation on the x-axis in degrees
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | 00 00 87 43
| 270.000000
| align="LEFT" | rotation on the y-axis in degrees
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | 00 00 00 00
| 0.000000
| align="LEFT" | rotation on the z-axis in degrees
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| colspan="2" bgcolor="#FFC800" | <tt>console_data</tt>
| align="LEFT" |
console type (00761-console_data.[[OBD:CONS|CONS]] of level 0)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C800C8" | 01 00
| 1
| align="LEFT" | console ID
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C87C64" | 08 00
| 8
| align="LEFT" | unknown
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| colspan="2" bgcolor="#B0C3D4" | <tt>_con_INFO</tt>
| align="LEFT" |
name of the "console deactivated" texture (00800-_CON_INFO.[[OBD:TXMP|TXMP]] of level 0)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| colspan="2" bgcolor="#E7CEA5" | <tt>_con_INFO</tt>
| align="LEFT" |
name of the "console activated" texture (00800-_CON_INFO.[[OBD:TXMP|TXMP]] of level 0)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| colspan="2" bgcolor="#FFDDDD" | <tt>_con_INFO</tt>
| align="LEFT" |
name of the "console used" texture (00800-_CON_INFO.[[OBD:TXMP|TXMP]] of level 0)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#64AAAA" | 01 00
| 1
| align="LEFT" | unknown
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#EBEBEB" | 01 00
| 1
| align="LEFT" | unknown
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| colspan="2" bgcolor="#8C8CCC" | <tt>level3c</tt>
| align="LEFT" | name of the function, which is called up when you use the console
|}


[[Image:Tool dialog - Console Properties.png]]


<CENTER>[[OBD:BINA/Character|<==]] <FONT SIZE=5>Console.BINA</FONT> [[OBD:BINA/Door|==>]]</CENTER>


{{OBD OBJC Footer | type=CONS | prev=CMBT | next=DOOR | name=Console | family=Level }}


[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File types]] >> [[OBD:BINA|BINA]] >> Console.BINA
{{OBD}}