OBD:BINA/PAR3: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (added family to footer template call)
 
(77 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{OBD BINA Header|align=right|prev=ONIE|type=PAR3|next=SABD|name=3D Particle|onistuff=b_3d}}
{{OBD BINA Header|prev=ONIE|type=PAR3|next=SABD|name=3D Particle|onistuff=b_3d}}


The following example is the raw/sep part of '''3RAPenv_bomb_e06.BINA''' (level 0).
The following example is the raw/separate file part of '''3RAPenv_bomb_e06.BINA''' (level 0). (Another example: http://ssg.oni2.net/oni_b_3e.htm )
 
Particle dialogs: http://ssg.oni2.net/subfold/bluebox/3d-part.htm


==Header==
==Header==
The header takes up 780 = 0x30C bytes.
The header takes up 780 = 0x30C bytes.


http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/bin_r_3h.gif
[[Image:bin_r_3h.gif]]


{| width="100%" border=1 cellspacing=0 cellpadding=0 bgcolor="#000000"
{{Table}}
|- bgcolor="#FFDDBB" align="CENTER"
{{OBDth}}
| width="15%" | '''Hex'''
{{OBDtr| 0x00 | char[4]    |FF0000| 33 52 41 50 | PAR3       | signature }}
| width="15%" | '''Translation'''
{{OBDtr| 0x04 | int32      |FFFF00| 9C 06 00 00 | 1692       | length of the following 3d particle part from this position }}
| width="60%" | '''Meaning'''
{{OBDtr| 0x08 | int16      |00FF00| 9C 06       | 1692       | length again }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x0A | int16      |00FF00| 12 00       | 18         | version }}
| bgcolor="#FF0000" | 33 52 41 50
{{OBDtr| 0x0C | int32      |00FFFF| 01 20 00 00 | 0x2001    | flags1; used flags (from left to right):
| PAR3
:0x'''01''' 00 00 00 - decorative
| align="LEFT" | particle 3d
:0x'''08''' 00 00 00 - use separate Y scale
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x'''E0''' 00 00 00 - sprite/contrail mode mask (3 bits, see below for possible values)
| bgcolor="#FFFF00" | 9C 06 00 00
:0x00 '''01''' 00 00 - geometry
| 1692
:0x00 '''02''' 00 00 - collide with walls
| align="LEFT" | 1692 bytes is the length of the following 3d particle part from this position
:0x00 '''04''' 00 00 - collide with chars
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x00 '''08''' 00 00 - scale to velocity
| bgcolor="#00FF00" | 9C 06
:0x00 '''10''' 00 00 - has velocity
| 1692
:0x00 '''20''' 00 00 - has orientation
| align="LEFT" | file size again
:0x00 '''40''' 00 00 - has position offset
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x00 '''80''' 00 00 - has object attachment matrix
| bgcolor="#00FF00" | 12 00
:0x00 00 '''01''' 00 - has unknown; ignored?
| 18
:0x00 00 '''02''' 00 - has decal state
| align="LEFT" | unknown; always the same
:0x00 00 '''04''' 00 - has texture animation random start tick
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x00 00 '''08''' 00 - has texture animation independent tick
| bgcolor="#00FFFF" | 01 20 00 00
:0x00 00 '''10''' 00 - has damage owner
| unknown
:0x00 00 '''20''' 00 - has contrail data
| align="LEFT" | unknown; looks like bitsets
:0x00 00 '''40''' 00 - has lensflare fading state
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x00 00 '''80''' 00 - has attractor
| bgcolor="#00FFFF" | 00 00 00 02
:0x00 00 00 '''01''' - has collision cache
| unknown
}}
| align="LEFT" | unknown; looks like bitsets
{{OBDtr| 0x10 | int32      |00FFFF| 00 00 00 02 | 0x02000000 | flags2; used flags (from left to right):
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x'''01''' 00 00 00 - use "special" tint (color is based on the health of the character who owns the particle; see [[ONGS]])
| bgcolor="#FF00FF" | 00 00 00 00
:0x'''02''' 00 00 00 - don't attract through walls
| 0
:0x'''08''' 00 00 00 - expire on cutscene
| align="LEFT" | unknown; looks like garbage data
:0x'''10''' 00 00 00 - die on cutscene
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x'''60''' 00 00 00 - disable level mask (2 bits, 0x00 - never disable, 0x40 - disable medium detail, 0x60 - disable low detail)
| bgcolor="#FF8000" | 01 00
:0x00 00 '''10''' 00 - draw as sky
| 1
:0x00 00 '''20''' 00 - decal full brightness
| align="LEFT" | amount of variables
:0x00 00 '''80''' 00 - decal
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x00 00 00 '''01''' - initially hidden
| bgcolor="#FF8000" | 01 00
:0x00 00 00 '''02''' - invisible
| 1
:0x00 00 00 '''04''' - fade out on edge
| align="LEFT" | amount of events/actions
:0x00 00 00 '''08''' - vector
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x00 00 00 '''10''' - lock position to link
| bgcolor="#FF8000" | 01 00
:0x00 00 00 '''20''' - is contrail emitter
| 1
:0x00 00 00 '''40''' - lensflare
| align="LEFT" | amount of emitted particles
:0x00 00 00 '''80''' - one sided edge fade
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
}}
| bgcolor="#FF8000" | 00 01
{{OBDtr| 0x14 | int32      |FF00FF| 00 00 00 00 | 0         | unused\runtine only }}
| 256
{{OBDtr| 0x18 | int16      |FF8000| 01 00       | 1         | number of variables }}
| align="LEFT" | unknown; always the same
{{OBDtr| 0x1a | int16      |FF8000| 01 00       | 1         | number of events/actions }}
{{OBDtr| 0x1c | int16      |FF8000| 01 00       | 1         | number of emitters }}
{{OBDtr| 0x1e | int16      |FF8000| 00 01       | 256       | unknown; always the same }}
|}
|}
===Event groups (0x20 - 0x5F)===
 
Field '''0x14''':
From empiric experiments I raise a thesis this field has meaning "used physics for this particle". It corresponds with Neo's [[OBOA]] researches ( field 0x18 in [[OBOA]] ):
::0 - no pre-fabricated physics, if you want physics for this particle, create it via PAR3's actions ( see down on this site for info about actions. )
::1 - unknown, looks like it disables all physics context ( even the PAR3 action-induced one )
::2 - pre-fabricated physics type 1 - reacts on collisions, ignores gravity.
::3 - unknown, looks like it disables all physics context ( even the PAR3 action-induced one ) - maybe because this is "physics" for [[OBOA]] objects which will have [[OBAN]] animation ?
::4 - pre-fabricated physics type 2 - reacts on collisions, gravity is not ignored.
 
Judging from this discovery it seems possible that maybe there are more ONI file types which can have this "used physics" field. For example [[DOOR]], unknown field 0x18 ( is 0x 02|00|00|00 -> reacts on collisions, ignores gravity ). Maybe there are more files with this field ? --[[User:Loser|Loser]] 07:32, 16 August 2009 (UTC)
:So just checking: when you set this field, the particles suddenly had collisions\gravity and such? [[User:Gumby|Gumby]] 02:31, 17 August 2009 (UTC)
::Same question as Gumby. For all I know particles do not have "physics", only objects and characters have. As for other uses of this "physics type" thing: highly unlikely. I've said it before and I'll say it again: the physics system in Oni is simplistic. There's nothing that it can do more than it already does. Don't waste your time on it. [[User:Neo|Neo]]
 
 
 
Sprite modes:
:*0 - sprite (face camera, orient to screen)
:*1 - rotated sprite (face camera, orient to particle)
:*2 - beam (parallel, face camera)
:*3 - arrow (parallel, orient to particle)
:*4 - flat (perpendicular)
:*7 - discus (parallel, orient to particle)
 
Contrail modes:
:*5 - contrail (orient to particle)
:*6 - contrail (face camera)
 
HasX flags:
:For each HasX flags that is set space will be allocated in the particle to hold the respective value. For example:
:*"has velocity" - allocates space for the velocity vector (3 floats = 12 bytes)
:*"has orientation" - allocates space for a 3x3 matrix (9 floats = 36 bytes)
:*"has object attachment matrix" - allocates space for a pointer to an "object" transform matrix (pointer = 4 bytes)
:*"has damage owner" - allocates space for an int32 that indicates who owns the particle (typically the owner is a character or a turret)
:The creator of a particle is responsable for properly initializing these values.
:In the specific case of particle emitters the newly emitted particle can inherit these values from the emitting particle. A value is inherited if:
:*both the emitting particle and emitted particle have the coresponding HasX flag set
:*the emitter itself doesn't calculate another value (orientation, velocity etc.)
 
===Event groups===
Here we have 16 4-byte slots, which correspond to the following 16 particle event types :
Here we have 16 4-byte slots, which correspond to the following 16 particle event types :
{|border=1 cellspacing=0
{|border=1 cellspacing=0
Line 79: Line 121:
:*actions {7,8} will be triggered by a '''hit_char''' event
:*actions {7,8} will be triggered by a '''hit_char''' event
:*action {9} will be triggered by a '''lifetime''' event
:*action {9} will be triggered by a '''lifetime''' event
;Back to the silly 3RAPenv_bomb_e06.BINA...
 
{| width="100%" border=1 cellspacing=0 cellpadding=0 bgcolor="#000000"
{{Table}}
|- bgcolor="#FFDDBB" align="CENTER"
{{OBDth}}
!Offset
{{OBDtr| 0x20 | int16,int16 |FFC8C8| 00 00 01 00 | 0, 1 | action 0 (actions 0 to 1) triggered by '''update''' event }}
!Raw hex
{{OBDtr| 0x24 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''pulse''' event }}
!Value
{{OBDtr| 0x28 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''start''' event }}
!Meaning
{{OBDtr| 0x2C | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''stop''' event }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x30 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''bgfx_start''' event }}
|0x20
{{OBDtr| 0x34 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''bgfx_stop''' event }}
| bgcolor="#FFC8C8" | 00 00 01 00
{{OBDtr| 0x38 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''hit_wall''' event }}
| 0, 1
{{OBDtr| 0x3C | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''hit_char''' event }}
| align="LEFT" | action 0 (actions 0 to 1) triggered by '''update''' event
{{OBDtr| 0x40 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''lifetime''' event }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x44 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''explode''' event }}
|0x24
{{OBDtr| 0x48 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''brokenlink''' event }}
| bgcolor="#FFC8C8" | 01 00 01 00
{{OBDtr| 0x4C | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''create''' event }}
| 1, 1
{{OBDtr| 0x50 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''die''' event }}
| align="LEFT" | no action (actions 1 to 1) triggered by '''pulse''' event
{{OBDtr| 0x54 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''newattractor''' event }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x58 | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''delay_start''' event }}
|0x28
{{OBDtr| 0x5C | int16,int16 |FFC8C8| 01 00 01 00 | 1, 1 | no action (actions 1 to 1) triggered by '''delay_stop''' event }}
| bgcolor="#FFC8C8" | 01 00 01 00
|}
| 1, 1
 
| align="LEFT" | no action (actions 1 to 1) triggered by '''start''' event
===Particle Properties===
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{Table}}
|0x2C
{{OBDth}}
| bgcolor="#FFC8C8" | 01 00 01 00
{{OBDtrBK|float property Lifetime (seconds, 0 <nowiki>=</nowiki> live forever) }}
| 1, 1
{{OBDtr| 0x60 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
| align="LEFT" | no action (actions 1 to 1) triggered by '''stop''' event
{{OBDtr| 0x64 | float    |C8FFC8| 00 00 40 3F | 0.750000    | value }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x68 |          |C8FFC8|            |            | not used for float values }}
|0x30
{{OBDtrBK|float property Collision radius }}
| bgcolor="#FFC8C8" | 01 00 01 00
{{OBDtr| 0x7C | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
| 1, 1
{{OBDtr| 0x80 | float    |C8FFC8| 00 00 00 00 | 0.0        | value }}
| align="LEFT" | no action (actions 1 to 1) triggered by '''bgfx_start''' event
{{OBDtr| 0x84 |          |C8FFC8|            |            | not used for float values }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtrBK|Others}}
|0x34
{{OBDtr| 0x98 | float    |FFC800| 00 00 00 00 | 0.000000    | AI dodge radius }}
| bgcolor="#FFC8C8" | 01 00 01 00
{{OBDtr| 0x9C | float    |FFC800| 00 00 00 00 | 0.000000    | AI alert radius }}
| 1, 1
{{OBDtr| 0xA0 | char[16] |FFC800| 00          | ""          | flyby sound name }}
| align="LEFT" | no action (actions 1 to 1) triggered by '''bgfx_stop''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x38
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''hit_wall''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x3C
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''hit_char''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x40
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''lifetime''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x44
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''explode''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x48
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''brokenlink''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x4C
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''create''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x50
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''die''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x54
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''newattractor''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x58
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''delay_start''' event
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
|0x5C
| bgcolor="#FFC8C8" | 01 00 01 00
| 1, 1
| align="LEFT" | no action (actions 1 to 1) triggered by '''delay_stop''' event
|}
|}


===Other crap===
===Particle Appearance===
{| width="100%" border=1 cellspacing=0 cellpadding=0 bgcolor="#000000"
{{Table}}
|- bgcolor="#808080" align="CENTER" valign="TOP"
{{OBDth}}
| colspan="3" | <font size="2" color="#FFFFFF">First of the 19 variable/constant blocks of the header :</font>
{{OBDtrBK|float property Scale }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0xB0 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
| bgcolor="#FFFFC8" | 03 00 00 00
{{OBDtr| 0xB4 | float    |C8FFC8| 00 00 80 3F | 1.0         | value }}
| 3
{{OBDtr| 0xB8 |          |C8FFC8|             |             | not used for float values }}
| align="LEFT" | type (3:float, 0:16-byte string)
{{OBDtrBK|float property Y Scale }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0xCC | int32    |FFFFC8| 03 00 00 00 | 3           | value type: float }}
| bgcolor="#C8FFC8" | 00 00 40 3F
{{OBDtr| 0xD0 | float    |C8FFC8| 00 00 80 3F | 1.0         | value }}
| 0.750000
{{OBDtr| 0xD4 |          |C8FFC8|            |            | not used for float values }}
| align="LEFT" | value
{{OBDtrBK|float property Rotation }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0xE8 | int32    |FFFFC8| 00 00 00 00 | 0          | value type: variable }}
| bgcolor="#C8FFC8" | 80 0B 00 00
{{OBDtr| 0xEC | char[16] |C8FFC8|            | "rotate"   | value }}
| unknown
{{OBDtr| 0xFC | int32    |C8FFFF| 00 00 00 00 |            | runtime: storage type }}
| align="LEFT" | value (string only)
{{OBDtr| 0x100 | int32  |FFC8FF| 00 00 00 00 |            | runtime: storage offset }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtrBK|float property Alpha }}
| bgcolor="#C8FFC8" | 02 02 00 00
{{OBDtr| 0x104 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
| unknown
{{OBDtr| 0x108 | float    |C8FFC8| 00 00 80 3F | 1.0        | value }}
| align="LEFT" | value (string only)
{{OBDtr| 0x10C |         |C8FFC8|             |             | not used for float values }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtrBK|Others}}
| bgcolor="#C8FFC8" | 00 00 00 00
{{OBDtr| 0x120 | char[32] |C800C8|             | "notfoundtex" | texture name or geometry name }}
| unknown
{{OBDtrBK|float property X Offset }}
| align="LEFT" | value (string only)
{{OBDtr| 0x140 | int32    |FFFFC8| 03 00 00 00 | 3           | value type: float }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x144 | float    |C8FFC8| 00 00 00 00 | 0.0        | value }}
| bgcolor="#C8FFFF" | E8 01 EF 01
{{OBDtr| 0x148 |          |C8FFC8|            |            | not used for float values }}
| unknown
{{OBDtrBK|float property X Shorten }}
| align="LEFT" | unknown; I'd say garbage
{{OBDtr| 0x15C | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x160 | float    |C8FFC8| 00 00 00 00 | 0.0        | value }}
| bgcolor="#FFC8FF" | 97 3A 42 89
{{OBDtr| 0x164 |         |C8FFC8|             |             | not used for float values }}
| unknown
{{OBDtrBK|color property Tint }}
| align="LEFT" | unknown; I'd say garbage
{{OBDtr| 0x178 | int32    |FFFFC8| 07 00 00 00 | 7          | value type: color }}
|- bgcolor="#808080" align="CENTER" valign="TOP"
{{OBDtr| 0x17C | float    |C8FFC8| FF FF FF FF | white      | value }}
| colspan="3" | <font size="2" color="#FFFFFF">Below follow the remaining colors.</font>
{{OBDtr| 0x180 |          |C8FFC8|            |            | not used for color values }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtrBK|float property Edge Fade Min (min value used: 0, max value used: 0.95) }}
| bgcolor="#FFC800" | 00 00 00 00
{{OBDtr| 0x194 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
| 0.000000
{{OBDtr| 0x198 | float    |C8FFC8| 00 00 00 00 | 0.0        | value }}
| align="LEFT" | unknown
{{OBDtr| 0x19C |          |C8FFC8|            |             | not used for float values }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtrBK|float property Edge Fade Max (min value used: 0, max value used: 1) }}
| bgcolor="#FFC800" | 00 00 00 00
{{OBDtr| 0x1B0 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
| 0.000000
{{OBDtr| 0x1B4 | float    |C8FFC8| 00 00 00 3F | 0.5        | value }}
| align="LEFT" | unknown
{{OBDtr| 0x1B8 |         |C8FFC8|             |             | not used for float values }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtrBK|float property Max Contrail (min value used: 0, max value used: 100) }}
| colspan="2" bgcolor="#FFC800" | not used
{{OBDtr| 0x1CC | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
| align="LEFT" | unknown; 16 byte string
{{OBDtr| 0x1D0 | float    |C8FFC8| 00 00 00 00 | 0.0        | value }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x1D4 |          |C8FFC8|             |             | not used for float values }}
| colspan="2" bgcolor="#C800C8" | <tt>notfoundtex</tt>
{{OBDtrBK|float property Lens Flare Distance (min value used: 0, max value used: 9000) }}
| align="LEFT" | texture name; the first 00 is the stop byte; 32 byte string
{{OBDtr| 0x1E8 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x1EC | float    |C8FFC8| 00 00 00 00 | 0.0        | value }}
| bgcolor="#C87C64" | 00 00
{{OBDtr| 0x1F0 |          |C8FFC8|            |             | not used for float values }}
| 0
{{OBDtrBK|Others}}
| align="LEFT" | unknown
{{OBDtr| 0x204 | int16    |C87C64| 00 00       | 0          | fade in frames }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x206 | int16    |C87C64| 00 00       | 0           | fade out frames }}
| bgcolor="#C87C64" | 00 00
{{OBDtr| 0x208 |          |C87C64| 64 00      | 100        | max decals }}
| 0
{{OBDtr| 0x20A |          |C87C64| 3C 00      | 60          | decal fade frames }}
| align="LEFT" | unknown
{{OBDtrBK|float property Decal Wrap Angle (min value used: 20, max value used: 120) }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x20C | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
| bgcolor="#C87C64" | 64 00
{{OBDtr| 0x210 | float    |C8FFC8| 00 00 70 42 | 60.0        | value }}
| 100
{{OBDtr| 0x214 |         |C8FFC8|             |             | not used for float values }}
| align="LEFT" | unknown
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C87C64" | 3C 00
| 60
| align="LEFT" | unknown
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#B0C3D4" | 00 00 00 00
| 0
| align="LEFT" | unknown
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#B0C3D4" | 00 00 00 00
| 0
| align="LEFT" | unknown
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#B0C3D4" | 00 00 00 00
| 0
| align="LEFT" | unknown
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| colspan="2" bgcolor="#B0C3D4" | not used
| align="LEFT" | unknown; name of a particle; 64 byte string
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#E7CEA5" | AC 22 81 0B
| unknown
| align="LEFT" | unknown; maybe garbage?
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#E7CEA5" | E0 22 81 0B
| unknown
| align="LEFT" | unknown; maybe garbage?
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#E7CEA5" | 88 24 81 0B
| unknown
| align="LEFT" | unknown; maybe garbage?
|}
|}


===Particle Attractor===
{{Table}}
{{OBDth}}
{{OBDtr| 0x228 | int32    |B0C3D4| 00 00 00 00 | none        | particle attractor type
: 0 - none
: 1 - link
: 2 - class
: 3 - tag
: 4 - characters
: 5 - hostiles
: 6 - emitted towards
: 7 - parent's attractor
: 8 - all characters }}
{{OBDtr| 0x22C | int32    |B0C3D4| 00 00 00 00 | distance    | particle attractor selection
: 0 - distance
: 1 - angle }}
{{OBDtr| 0x230 |          |B0C3D4| 00 00 00 00 | 0          | runtime only }}
{{OBDtr| 0x234 | char[64] |B0C3D4| 00          | ""          | [[OBD:BINA/OBJC/PART|particle]] name (when attractor type is 3) or particle class name (when attractor type is 2) }}
{{OBDtrBK|float property Attractor Max Distance (min value used: 12, max value used: 2000) }}
{{OBDtr| 0x274 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
{{OBDtr| 0x278 | float    |C8FFC8| 00 00 16 43 | 150.0      | value }}
{{OBDtr| 0x27C |          |C8FFC8|            |            | not used for float values }}
{{OBDtrBK|float property Attractor Max Angle (min value used: 15, max value used: 180) }}
{{OBDtr| 0x290 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
{{OBDtr| 0x294 | float    |C8FFC8| 00 00 F0 41 | 30.0        | value }}
{{OBDtr| 0x298 |          |C8FFC8|            |            | not used for float values }}
{{OBDtrBK|float property Attractor Angle Select Min (min value used: 3, max value used: 180) }}
{{OBDtr| 0x2AC | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
{{OBDtr| 0x2B0 | float    |C8FFC8| 00 00 40 40 | 3.0        | value }}
{{OBDtr| 0x2B4 |          |C8FFC8|            |            | not used for float values }}
{{OBDtrBK|float property Attractor Angle Select Max (min value used: 20, max value used: 180) }}
{{OBDtr| 0x2C8 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
{{OBDtr| 0x2CC | float    |C8FFC8| 00 00 A0 41 | 20.0        | value }}
{{OBDtr| 0x2D0 |          |C8FFC8|            |            | not used for float values }}
{{OBDtrBK|float property Attractor Angle Select Weight (min value used: 1, max value used: 100) }}
{{OBDtr| 0x2E4 | int32    |FFFFC8| 03 00 00 00 | 3          | value type: float }}
{{OBDtr| 0x2E8 | float    |C8FFC8| 00 00 40 40 | 3.0        | value }}
{{OBDtr| 0x2EC |          |C8FFC8|            |            | not used for float values }}
{{OBDtrBK|Runtime only}}
{{OBDtr| 0x300 |          |E7CEA5| AC 22 81 0B | 0B 81 22 AC | runtime pointer to variables }}
{{OBDtr| 0x304 |          |E7CEA5| E0 22 81 0B | 0B 81 22 E0 | runtime pointer to events/actions}}
{{OBDtr| 0x308 |          |E7CEA5| 88 24 81 0B | 0B 81 24 88 | runtime pointer to emissions }}
|}


;Value types:
:0 - variable; variable name follows
:1 - none (action parameters use this to indicate an unused parameter)
:3 - float; constant; 1 float value follows
:4 - float; random; 2 float values follow (min, max)
:5 - float; bell curve; 2 float values follow (mean, stddev)
:6 - instance; instance name follows
:7 - color; constant; 1 color follows
:8 - color; random; 2 color follow (min, max)
:9 - color; bell curve; 2 color follow (mean, stddev)
:10 - int32; constant; int32 follows
:11 - time cycle; 2 float values follow (cycle length, scale)
--------
--------
==Variables==
==Variables==
Every variable takes up 52=0x34 bytes. The number of variables is specified at 0x18 in the header.
Every variable takes up 52=0x34 bytes. The number of variables is specified at 0x18 in the header.


http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/bin_r_31.gif
For each variable space is allocated then a particle is created. Variables can be modified by some actions like "linear change", "random change" etc.  
 
[[Image:bin_r_31.gif]]


{| width="100%" border=1 cellspacing=0 cellpadding=0 bgcolor="#000000"
{{Table}}
|- bgcolor="#FFDDBB" align="CENTER"
{{OBDth}}
| width="15%" | '''Hex'''
{{OBDtr| 0x00 | char[16] |C8FFC8|             | "rotate" | name of the variable }}
| width="15%" | '''Translation'''
{{OBDtr| 0x10 | int32    |C8FFFF| 02 00 00 00 | 2 | storage type: float }}
| width="60%" | '''Meaning'''
{{OBDtr| 0x14 | int32    |FFC8FF| 30 00 00 00 | 48 | runtime: storaget offset (incremented by the storage type size for every next variable) }}
|- bgcolor="#808080" align="CENTER" valign="TOP"
{{OBDtrBK|Initial value }}
| colspan="3" | <font size="2" color="#FFFFFF">Variable name and type</font>
{{OBDtr| 0x18 | int32    |FFFFC8| 04 00 00 00 | 4           | value type: random }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x1c | float    |C8FFC8| 00 00 B4 C3 | -360.000000 | min value }}
| colspan="2" bgcolor="#C8FFC8" | <tt>rotate</tt>
{{OBDtr| 0x20 | float    |C8FFC8| 00 00 B4 43 | 360.000000 | max value }}
| align="LEFT" | name of the variable
{{OBDtr| 0x24 |          |C8FFC8|             |             | not used for random float }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x2c |         |C8FFFF|             |             | not used for random float }}
| bgcolor="#C8FFFF" | 02 00 00 00
{{OBDtr| 0x30 |         |FFC8FF|             |             | not used for random float }}
| 2
| align="LEFT" | variable type (float)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | 30 00 00 00
| 48
| align="LEFT" | offset of variable data to ??? (incremented by 4 for every next variable)
|- bgcolor="#808080" align="CENTER" valign="TOP"
| colspan="3" | <font size="2" color="#FFFFFF">Variable value parameters</font>
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFFFC8" | 04 00 00 00
| 4
| align="LEFT" | 3:single value, 4:min-max (random?), 7:...
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 00 00 B4 C3
| -360.000000
| align="LEFT" | min value (or single value)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 00 00 B4 43
| 360.000000
| align="LEFT" | max value (or garbage)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 02 02 00 00
| unknown
| align="LEFT" | unknown; I'd say garbage
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 00 00 00 00
| unknown
| align="LEFT" | unknown; I'd say garbage
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFFF" | EC 01 EA 01
| unknown
| align="LEFT" | unknown; I'd say garbage
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | 97 3A 42 89
| unknown
| align="LEFT" | unknown; I'd say garbage
|}
|}


;Storage types used for variables
:0x0002 (0x02 00 00 00) - float (storage size: 4)
:0x0008 (0x08 00 00 00) - color (storage size: 4)
:0x1000 (0x00 10 00 00) - pingpong state (storage size: 4)
;Other storage types
These storage types are never used for variables. They might work but since there are no actions that can output such values it doesn't make much sense to declare variables using these types.
:0x0001 (0x01 00 00 00) - int16 (storage size: 2) (never used)
:0x0004 (0x04 00 00 00) - impact name (storage size: 16)
:0x1010 (0x10 10 00 00) - action index (storage size: 4)
:0x1020 (0x20 10 00 00) - emitter (storage size: 4)
:0x1030 (0x30 10 00 00) - blast falloff (storage size: 4)
:0x1040 (0x40 10 00 00) - coord frame (storage size: 4)
:0x1050 (0x50 10 00 00) - collision orient (storage size: 4)
:0x1060 (0x60 10 00 00) - boolean (storage size: 4)
:0x1070 (0x70 10 00 00) - ambient sound (storage size: 4) (never used)
:0x1080 (0x80 10 00 00) - impulse sound (storage size: 4) (never used)
:0x1090 (0x90 10 00 00) - impact modifier (storage size: 4)
:0x10A0 (0xA0 10 00 00) - damage type (storage size: 4)
:*0 - normal
:*1 - minor stun
:*2 - major stun
:*3 - minor knockdown
:*4 - major knockdown
:*5 - blownup
:*6 - pickup
:0x10B0 (0xB0 10 00 00) - direction (storage size: 4)
:0x2000 (0x00 20 00 00) - ambient sound name (storage size: 16)
:0x4000 (0x00 40 00 00) - impulse sound name (storage size: 16)


-------
-------
==Actions==
==Actions==
Every action takes up 424=0x1A8 bytes. The number of actions is specified at 0x1A in the header.
Every action takes up 424=0x1A8 bytes. The number of actions is specified at 0x1A in the header.


The available actions are listed [http://geyser.oni2.net/obd/exe/particle_actions.txt HERE], together with their 2 sets of parameters : A-parameters and B-parameters.
[[Image:bin_r_32.gif]]


http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/bin_r_32.gif
{{Table}}
 
{{OBDth}}
{|width="100%" border=1 cellspacing=0 cellpadding=0 bgcolor="#000000"
{{OBDtr| 0x00 | int32 |FFC8C8| 22 00 00 00 | 34 | [[OBD:BINA/PAR3/Actions|Action type]]: Rotate Y }}
|- bgcolor="#FFDDBB" align="CENTER"
{{OBDtr| 0x04 | int32 |FFFFC8| 00 00 00 00 | 0 | unknown }}
| width="15%" | '''Hex'''
{{OBDtrBK|First output paramter (reference to a variable which the action can modify) }}
| width="15%" | '''Translation'''
{{OBDtr| 0x00 | char[16] |C8FFC8| 00          | "" | variable name, if empty this block is not used }}
| width="60%" | '''Meaning'''
{{OBDtr| 0x10 | int32    |C8FFFF| 00 00 00 00 | 0   | runtime: storage type }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x14 | int32    |FFC8FF| 00 00 00 00 | 0   | runtime: storage offset }}
| bgcolor="#FFC8C8" | 22 00 00 00
{{OBDtrBK|First input parameter}}
| 34
{{OBDtr| 0x00 | int32    |FFFFC8| 0A 00 00 00 | 10 | value type: int32 }}
| align="LEFT" | [http://geyser.oni2.net/obd/exe/particle_actions.txt action type] (Rotate Y)
{{OBDtr| 0x04 | int32    |C8FFC8| 01 00 00 00 | 1   | value (rotation coordinate space)}}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x08 |         |C8FFC8|             |     | not used for int32 values }}
| bgcolor="#FFFFC8" | 00 00 00 00
{{OBDtr| 0x14 |         |C8FFFF|             |     | not used for int32 values }}
| 0
{{OBDtr| 0x18 |         |FFC8FF|             |     | not used for int32 values }}
| align="LEFT" | unknown, looks like a (big) pointer
|- bgcolor="#808080" align="CENTER" valign="TOP"
| colspan="3" | <font size="2" color="#FFFFFF">First of the eight A-parameters :</font>
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| colspan="2" bgcolor="#C8FFC8" | not used
| align="LEFT" | name of the parameter (e.g. variable name)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFFF" | 00 00 00 00
| 0
| align="LEFT" | type of the parameter
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | 00 00 00 00
| 0
| align="LEFT" | unknown; I'd say garbage
|- bgcolor="#808080" align="CENTER" valign="TOP"
| colspan="3" | <font size="2" color="#FFFFFF">First of the eight B-parameters :</font>
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFFFC8" | 0A 00 00 00
| 10
| align="LEFT" | type of the "space" parameter : integer
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 01 00 00 00
| 1
| align="LEFT" | value of the "space" parameter : world, relative, dunno
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 00 00 00 00
| unknown
| align="LEFT" | value (string only)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 00 00 00 00
| unknown
| align="LEFT" | value (string only)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 00 00 00 00
| unknown
| align="LEFT" | value (string only)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFFF" | 00 00 00 00
| unknown
| align="LEFT" | unknown; I'd say garbage
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | 00 00 00 00
| unknown
| align="LEFT" | unknown; I'd say garbage
|}
|}




----
----
==Emitted particles==
Every emitted particle takes up 444=0x1BC bytes. The number of emitted particles is specified at 0x1C in the header.


http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/bin_r_33.gif
==Emitters==
Every emitter takes up 444=0x1BC bytes. The number of emitters is specified at 0x1C in the header. Each emitter has space for 12 parameters but it appears that the last 2 are never used.


{| width="100%" border=1 cellspacing=0 cellpadding=0 bgcolor="#000000"
[[Image:bin_r_33.gif]]
|- bgcolor="#FFDDBB" align="CENTER"
 
| width="15%" | '''Hex'''
{{Table}}
| width="15%" | '''Translation'''
{{OBDth}}
| width="60%" | '''Meaning'''
{{OBDtr| 0x00 | char[64] |FF0000| |"env_bomb_p09"         | name of the particle to emit (3RAPenv_bomb_p09.BINA) }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x40 | int32    |FFFF00| C0 92 62 00 |          | runtime pointer to emitted particle class }}
| colspan="2" bgcolor="#FF0000" | <tt>env_bomb_p09</tt>
{{OBDtr| 0x44 | int32    |00FF00| 47 00 00 00 | 0x47      | flags; used values:
| align="LEFT" | name of the particle to emit (3RAPenv_bomb_p09.BINA); 64 byte string
:0x'''01''' 00 00 00 - initially on
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x'''02''' 00 00 00 - increase particle count
| bgcolor="#FFFF00" | C0 92 62 00
:0x'''04''' 00 00 00 - turn off at treshold
| unknown
:0x'''10''' 00 00 00 - emit with parent velocity
| align="LEFT" | unknown; maybe old offset data?
:0x'''20''' 00 00 00 - ignored?
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x'''40''' 00 00 00 - orient to velocity
| bgcolor="#00FF00" | 47 00 00 00
:0x'''80''' 00 00 00 - inherit tint
| 71
:0x00 '''01''' 00 00 - one per attractor
| align="LEFT" | unknown
:0x00 '''02''' 00 00 - at least one
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:0x00 '''04''' 00 00 - cycle attractors }}
| bgcolor="#00FFFF" | 04 00
{{OBDtr| 0x48 | int16    |00FFFF| 04 00       | 4         | turn off treshold }}
| 4
{{OBDtr| 0x4A | uint16  |00FFFF| FF FF       | 65535    | emit probability (scaled by 65535) }}
| align="LEFT" | unknown
{{OBDtr| 0x4C | float    |FF00FF| 00 00 20 41 | 10.000000 | amount of (sprite) copies }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x50 | int32    |FFC8C8| 00 00 00 00 | 0        | link to:
| bgcolor="#00FFFF" | FF FF
:0 - nothing
| -1
:1 - this particle
| align="LEFT" | unknown
:2-9 - to the particle last emitted by emitter 0-7
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:10 - this particle's link
| bgcolor="#FF00FF" | 00 00 20 41
}}
| 10.000000
{{OBDtr| 0x54 | int32    |FFC8C8| 00 00 00 00 | 0        | emit rate; can use parameters 1 and 2; possible values (in dec):
| align="LEFT" | unknown
:0 - continuous (emit interval)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:1 - random (min interval, max interval)
| bgcolor="#FFC8C8" | 00 00 00 00
:2 - instant
| 0
:3 - distance (distance)
| align="LEFT" | unknown
:4 - attractor (recharge time, check interval) }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x58 | int32    |FFC8C8| 00 00 00 00 | 0        | position; can use parameters 3, 4 and 5; possible values (in dec):
| bgcolor="#FFC8C8" | 00 00 00 00
:0 - point
| 0
:1 - line (radius)
| align="LEFT" | unknown
:2 - circle (inner radius, outer radius)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:3 - sphere (inner radius, outer radius)
| bgcolor="#FFC8C8" | 00 00 00 00
:4 - offset (x, y, z)
| 0
:5 - cylinder (height, inner radius, outer radius)
| align="LEFT" | unknown
:6 - body-surface (offset radius)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:7 - body-bones (offset radius)}}
| bgcolor="#FFC8C8" | 03 00 00 00
{{OBDtr| 0x5C | int32    |FFC8C8| 03 00 00 00 | 3        | direction; can use parameters 6, 7 and 8; possible values (in dec):
| 3
:0 - straight
| align="LEFT" | unknown
:1 - random
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:2 - cone (angle, center bias)
| bgcolor="#FFC8C8" | 00 00 00 00
:3 - ring (angle, offset)
| 0
:4 - offset (x, y, z)
| align="LEFT" | unknown
:5 - inaccurate (base angle, inaccuracy, center bias)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:6 - attractor}}
| bgcolor="#FFC8C8" | 0C 00 00 00
{{OBDtr| 0x60 | int32    |FFC8C8| 00 00 00 00 | 0         | speed; can use parameters 9 and 10; possible values (in dec):
| 12
:0 - uniform (speed)
| align="LEFT" | unknown
:1 - stratified (speed 1, speed 2)}}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x64 | int32    |FFC8C8| 0C 00 00 00 | 12        | orientation dir; possible values (in dec):
| bgcolor="#FFC8C8" | 04 00 00 00
:0 - parent +X
| 4
:1 - parent -X
| align="LEFT" | unknown
:2 - parent +Y
|- bgcolor="#808080" align="CENTER" valign="TOP"
:3 - parent -Y
| colspan="3" | <font size="2" color="#FFFFFF">Below follows the first of the twelve blocks of the package.</font>
:4 - parent +Z
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:5 - parent -Z
| bgcolor="#FFFFC8" | 04 00 00 00
:6 - world +X
| 4
:7 - world -X
| align="LEFT" | identifier
:8 - world +Y
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:9 - world -Y
| bgcolor="#C8FFC8" | 00 00 00 3E
:10 - world +Z
| 0.125000
:11 - world -Z
| align="LEFT" | unknown
:12 - velocity
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
:13 - reverse-velocity
| bgcolor="#C8FFC8" | 00 00 00 3F
:14 - towards-emitter
| 0.500000
:15 - awayfrom-emitter}}
| align="LEFT" | unknown
{{OBDtr| 0x68 | int32    |FFC8C8| 04 00 00 00 | 4         | orientation up; same possible values as for orientation dir }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtrBK|First emitter parameter }}
| bgcolor="#C8FFC8" | 02 02 00 00
{{OBDtr| 0x00 | int32    |FFFFC8| 04 00 00 00 | 4         | value type: random float }}
| unknown
{{OBDtr| 0x04 | float    |C8FFC8| 00 00 00 3E | 0.125000 | attractor - recharge time min value }}
| align="LEFT" | unknown; maybe garbage?
{{OBDtr| 0x08 | float    |C8FFC8| 00 00 00 3F | 0.500000 | attractor - recharge time max value }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x0C |         |C8FFC8|             |           | not used for random float values }}
| bgcolor="#C8FFC8" | 00 00 00 00
{{OBDtr| 0x14 |         |C8FFFF|             |           | not used for random float values }}
| unknown
{{OBDtr| 0x18 |         |FFC8FF|             |           | not used for random float values }}
| align="LEFT" | unknown; maybe garbage?
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFFF" | F6 01 ED 01
| unknown
| align="LEFT" | unknown; maybe garbage?
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | 97 3A 42 89
| unknown
| align="LEFT" | unknown; maybe garbage?
|}
|}


;Direction type Inaccurate vs. Cone
:The Inaccurate type was designed for standard ballistic weapons which will have a cone of fire expanding out from the point of origin, therefore it works identically to the Cone type except with an additional factor, "inaccuracy". The "angle" supplied is now a base angle, which is added to by the inaccuracy setting. The "center bias" for Cone and Inaccurate emitters can be positive to pull the dispersion of particles towards the center of the vector, or negative to push them towards the edges of the cone.
:The inaccuracy setting is only used if the originating character is an AI or turret. The AI's or turret's shooting skill is looked up and multiplied by the difficulty setting's weapon inaccuracy multiplier (see [[ONGS]]), then added to the base angle. With the bias taken into account, and some randomization added by the conical dispersion function, this determines the exact trajectory of the bullet coming from the gun.


----
----
----
----
{{OBD BINA Footer|prev=ONIE|type=PAR3|next=SABD|name=3D Particle|onistuff=b_3d}}
{{OBD BINA Footer|prev=ONIE|type=PAR3|next=SABD|name=3D Particle|onistuff=b_3d|family=Level}}
 
{{OBD}}

Latest revision as of 23:44, 8 December 2023

ONI BINARY DATA
AKVA << Other file types >> CBPI
ONIE << Other BINA >> SABD
PAR3 : 3D Particle
switch to XML:BINA/PAR3 page
Overview @ Oni Stuff
OBD.png

The following example is the raw/separate file part of 3RAPenv_bomb_e06.BINA (level 0). (Another example: http://ssg.oni2.net/oni_b_3e.htm )

Particle dialogs: http://ssg.oni2.net/subfold/bluebox/3d-part.htm

Header

The header takes up 780 = 0x30C bytes.

Bin r 3h.gif

Offset Type Raw Hex Value Description
0x00 char[4] 33 52 41 50 PAR3 signature
0x04 int32 9C 06 00 00 1692 length of the following 3d particle part from this position
0x08 int16 9C 06 1692 length again
0x0A int16 12 00 18 version
0x0C int32 01 20 00 00 0x2001 flags1; used flags (from left to right):
0x01 00 00 00 - decorative
0x08 00 00 00 - use separate Y scale
0xE0 00 00 00 - sprite/contrail mode mask (3 bits, see below for possible values)
0x00 01 00 00 - geometry
0x00 02 00 00 - collide with walls
0x00 04 00 00 - collide with chars
0x00 08 00 00 - scale to velocity
0x00 10 00 00 - has velocity
0x00 20 00 00 - has orientation
0x00 40 00 00 - has position offset
0x00 80 00 00 - has object attachment matrix
0x00 00 01 00 - has unknown; ignored?
0x00 00 02 00 - has decal state
0x00 00 04 00 - has texture animation random start tick
0x00 00 08 00 - has texture animation independent tick
0x00 00 10 00 - has damage owner
0x00 00 20 00 - has contrail data
0x00 00 40 00 - has lensflare fading state
0x00 00 80 00 - has attractor
0x00 00 00 01 - has collision cache
0x10 int32 00 00 00 02 0x02000000 flags2; used flags (from left to right):
0x01 00 00 00 - use "special" tint (color is based on the health of the character who owns the particle; see ONGS)
0x02 00 00 00 - don't attract through walls
0x08 00 00 00 - expire on cutscene
0x10 00 00 00 - die on cutscene
0x60 00 00 00 - disable level mask (2 bits, 0x00 - never disable, 0x40 - disable medium detail, 0x60 - disable low detail)
0x00 00 10 00 - draw as sky
0x00 00 20 00 - decal full brightness
0x00 00 80 00 - decal
0x00 00 00 01 - initially hidden
0x00 00 00 02 - invisible
0x00 00 00 04 - fade out on edge
0x00 00 00 08 - vector
0x00 00 00 10 - lock position to link
0x00 00 00 20 - is contrail emitter
0x00 00 00 40 - lensflare
0x00 00 00 80 - one sided edge fade
0x14 int32 00 00 00 00 0 unused\runtine only
0x18 int16 01 00 1 number of variables
0x1a int16 01 00 1 number of events/actions
0x1c int16 01 00 1 number of emitters
0x1e int16 00 01 256 unknown; always the same

Field 0x14: From empiric experiments I raise a thesis this field has meaning "used physics for this particle". It corresponds with Neo's OBOA researches ( field 0x18 in OBOA ):

0 - no pre-fabricated physics, if you want physics for this particle, create it via PAR3's actions ( see down on this site for info about actions. )
1 - unknown, looks like it disables all physics context ( even the PAR3 action-induced one )
2 - pre-fabricated physics type 1 - reacts on collisions, ignores gravity.
3 - unknown, looks like it disables all physics context ( even the PAR3 action-induced one ) - maybe because this is "physics" for OBOA objects which will have OBAN animation ?
4 - pre-fabricated physics type 2 - reacts on collisions, gravity is not ignored.

Judging from this discovery it seems possible that maybe there are more ONI file types which can have this "used physics" field. For example DOOR, unknown field 0x18 ( is 0x 02|00|00|00 -> reacts on collisions, ignores gravity ). Maybe there are more files with this field ? --Loser 07:32, 16 August 2009 (UTC)

So just checking: when you set this field, the particles suddenly had collisions\gravity and such? Gumby 02:31, 17 August 2009 (UTC)
Same question as Gumby. For all I know particles do not have "physics", only objects and characters have. As for other uses of this "physics type" thing: highly unlikely. I've said it before and I'll say it again: the physics system in Oni is simplistic. There's nothing that it can do more than it already does. Don't waste your time on it. Neo


Sprite modes:

  • 0 - sprite (face camera, orient to screen)
  • 1 - rotated sprite (face camera, orient to particle)
  • 2 - beam (parallel, face camera)
  • 3 - arrow (parallel, orient to particle)
  • 4 - flat (perpendicular)
  • 7 - discus (parallel, orient to particle)

Contrail modes:

  • 5 - contrail (orient to particle)
  • 6 - contrail (face camera)

HasX flags:

For each HasX flags that is set space will be allocated in the particle to hold the respective value. For example:
  • "has velocity" - allocates space for the velocity vector (3 floats = 12 bytes)
  • "has orientation" - allocates space for a 3x3 matrix (9 floats = 36 bytes)
  • "has object attachment matrix" - allocates space for a pointer to an "object" transform matrix (pointer = 4 bytes)
  • "has damage owner" - allocates space for an int32 that indicates who owns the particle (typically the owner is a character or a turret)
The creator of a particle is responsable for properly initializing these values.
In the specific case of particle emitters the newly emitted particle can inherit these values from the emitting particle. A value is inherited if:
  • both the emitting particle and emitted particle have the coresponding HasX flag set
  • the emitter itself doesn't calculate another value (orientation, velocity etc.)

Event groups

Here we have 16 4-byte slots, which correspond to the following 16 particle event types :

0:update 1:pulse 2:start 3:stop
4:bgfx_start 5:bgfx_stop 6:hit_wall 7:hit_char
8:lifetime 9:explode A:brokenlink B:create
C:die D:newattractor E:delay_start F:delay_stop

The ZZZZ actions in the file (ZZZZ is specified at 0x1A above) are bound to a specific event # by means of this list.

If the 4-byte slot for event # reads XX XX YY YY, where XXXX < YYYY < ZZZZ, then event # will execute all the actions whose slot is greater or equal to XXXX, and less than YYYY.

Example
3RAPglass_shard.BINA has 10 actions, distributed between events as follows :
(0,4)(4,4)(4,4)(4,4)(4,4)(4,4)(4,7)(7,9)(9,10)(10,10)(10,10)(10,10)(10,10)(10,10)(10,10)(10,10)
That means :
  • actions {0,1,2,3} will be triggered by an update event
  • actions {4,5,6} will be triggered by a hit_wall event
  • actions {7,8} will be triggered by a hit_char event
  • action {9} will be triggered by a lifetime event
Offset Type Raw Hex Value Description
0x20 int16,int16 00 00 01 00 0, 1 action 0 (actions 0 to 1) triggered by update event
0x24 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by pulse event
0x28 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by start event
0x2C int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by stop event
0x30 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by bgfx_start event
0x34 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by bgfx_stop event
0x38 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by hit_wall event
0x3C int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by hit_char event
0x40 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by lifetime event
0x44 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by explode event
0x48 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by brokenlink event
0x4C int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by create event
0x50 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by die event
0x54 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by newattractor event
0x58 int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by delay_start event
0x5C int16,int16 01 00 01 00 1, 1 no action (actions 1 to 1) triggered by delay_stop event

Particle Properties

Offset Type Raw Hex Value Description
float property Lifetime (seconds, 0 = live forever)
0x60 int32 03 00 00 00 3 value type: float
0x64 float 00 00 40 3F 0.750000 value
0x68 not used for float values
float property Collision radius
0x7C int32 03 00 00 00 3 value type: float
0x80 float 00 00 00 00 0.0 value
0x84 not used for float values
Others
0x98 float 00 00 00 00 0.000000 AI dodge radius
0x9C float 00 00 00 00 0.000000 AI alert radius
0xA0 char[16] 00 "" flyby sound name

Particle Appearance

Offset Type Raw Hex Value Description
float property Scale
0xB0 int32 03 00 00 00 3 value type: float
0xB4 float 00 00 80 3F 1.0 value
0xB8 not used for float values
float property Y Scale
0xCC int32 03 00 00 00 3 value type: float
0xD0 float 00 00 80 3F 1.0 value
0xD4 not used for float values
float property Rotation
0xE8 int32 00 00 00 00 0 value type: variable
0xEC char[16] "rotate" value
0xFC int32 00 00 00 00 runtime: storage type
0x100 int32 00 00 00 00 runtime: storage offset
float property Alpha
0x104 int32 03 00 00 00 3 value type: float
0x108 float 00 00 80 3F 1.0 value
0x10C not used for float values
Others
0x120 char[32] "notfoundtex" texture name or geometry name
float property X Offset
0x140 int32 03 00 00 00 3 value type: float
0x144 float 00 00 00 00 0.0 value
0x148 not used for float values
float property X Shorten
0x15C int32 03 00 00 00 3 value type: float
0x160 float 00 00 00 00 0.0 value
0x164 not used for float values
color property Tint
0x178 int32 07 00 00 00 7 value type: color
0x17C float FF FF FF FF white value
0x180 not used for color values
float property Edge Fade Min (min value used: 0, max value used: 0.95)
0x194 int32 03 00 00 00 3 value type: float
0x198 float 00 00 00 00 0.0 value
0x19C not used for float values
float property Edge Fade Max (min value used: 0, max value used: 1)
0x1B0 int32 03 00 00 00 3 value type: float
0x1B4 float 00 00 00 3F 0.5 value
0x1B8 not used for float values
float property Max Contrail (min value used: 0, max value used: 100)
0x1CC int32 03 00 00 00 3 value type: float
0x1D0 float 00 00 00 00 0.0 value
0x1D4 not used for float values
float property Lens Flare Distance (min value used: 0, max value used: 9000)
0x1E8 int32 03 00 00 00 3 value type: float
0x1EC float 00 00 00 00 0.0 value
0x1F0 not used for float values
Others
0x204 int16 00 00 0 fade in frames
0x206 int16 00 00 0 fade out frames
0x208 64 00 100 max decals
0x20A 3C 00 60 decal fade frames
float property Decal Wrap Angle (min value used: 20, max value used: 120)
0x20C int32 03 00 00 00 3 value type: float
0x210 float 00 00 70 42 60.0 value
0x214 not used for float values

Particle Attractor

Offset Type Raw Hex Value Description
0x228 int32 00 00 00 00 none particle attractor type
0 - none
1 - link
2 - class
3 - tag
4 - characters
5 - hostiles
6 - emitted towards
7 - parent's attractor
8 - all characters
0x22C int32 00 00 00 00 distance particle attractor selection
0 - distance
1 - angle
0x230 00 00 00 00 0 runtime only
0x234 char[64] 00 "" particle name (when attractor type is 3) or particle class name (when attractor type is 2)
float property Attractor Max Distance (min value used: 12, max value used: 2000)
0x274 int32 03 00 00 00 3 value type: float
0x278 float 00 00 16 43 150.0 value
0x27C not used for float values
float property Attractor Max Angle (min value used: 15, max value used: 180)
0x290 int32 03 00 00 00 3 value type: float
0x294 float 00 00 F0 41 30.0 value
0x298 not used for float values
float property Attractor Angle Select Min (min value used: 3, max value used: 180)
0x2AC int32 03 00 00 00 3 value type: float
0x2B0 float 00 00 40 40 3.0 value
0x2B4 not used for float values
float property Attractor Angle Select Max (min value used: 20, max value used: 180)
0x2C8 int32 03 00 00 00 3 value type: float
0x2CC float 00 00 A0 41 20.0 value
0x2D0 not used for float values
float property Attractor Angle Select Weight (min value used: 1, max value used: 100)
0x2E4 int32 03 00 00 00 3 value type: float
0x2E8 float 00 00 40 40 3.0 value
0x2EC not used for float values
Runtime only
0x300 AC 22 81 0B 0B 81 22 AC runtime pointer to variables
0x304 E0 22 81 0B 0B 81 22 E0 runtime pointer to events/actions
0x308 88 24 81 0B 0B 81 24 88 runtime pointer to emissions
Value types
0 - variable; variable name follows
1 - none (action parameters use this to indicate an unused parameter)
3 - float; constant; 1 float value follows
4 - float; random; 2 float values follow (min, max)
5 - float; bell curve; 2 float values follow (mean, stddev)
6 - instance; instance name follows
7 - color; constant; 1 color follows
8 - color; random; 2 color follow (min, max)
9 - color; bell curve; 2 color follow (mean, stddev)
10 - int32; constant; int32 follows
11 - time cycle; 2 float values follow (cycle length, scale)

Variables

Every variable takes up 52=0x34 bytes. The number of variables is specified at 0x18 in the header.

For each variable space is allocated then a particle is created. Variables can be modified by some actions like "linear change", "random change" etc.

Bin r 31.gif

Offset Type Raw Hex Value Description
0x00 char[16] "rotate" name of the variable
0x10 int32 02 00 00 00 2 storage type: float
0x14 int32 30 00 00 00 48 runtime: storaget offset (incremented by the storage type size for every next variable)
Initial value
0x18 int32 04 00 00 00 4 value type: random
0x1c float 00 00 B4 C3 -360.000000 min value
0x20 float 00 00 B4 43 360.000000 max value
0x24 not used for random float
0x2c not used for random float
0x30 not used for random float
Storage types used for variables
0x0002 (0x02 00 00 00) - float (storage size: 4)
0x0008 (0x08 00 00 00) - color (storage size: 4)
0x1000 (0x00 10 00 00) - pingpong state (storage size: 4)
Other storage types

These storage types are never used for variables. They might work but since there are no actions that can output such values it doesn't make much sense to declare variables using these types.

0x0001 (0x01 00 00 00) - int16 (storage size: 2) (never used)
0x0004 (0x04 00 00 00) - impact name (storage size: 16)
0x1010 (0x10 10 00 00) - action index (storage size: 4)
0x1020 (0x20 10 00 00) - emitter (storage size: 4)
0x1030 (0x30 10 00 00) - blast falloff (storage size: 4)
0x1040 (0x40 10 00 00) - coord frame (storage size: 4)
0x1050 (0x50 10 00 00) - collision orient (storage size: 4)
0x1060 (0x60 10 00 00) - boolean (storage size: 4)
0x1070 (0x70 10 00 00) - ambient sound (storage size: 4) (never used)
0x1080 (0x80 10 00 00) - impulse sound (storage size: 4) (never used)
0x1090 (0x90 10 00 00) - impact modifier (storage size: 4)
0x10A0 (0xA0 10 00 00) - damage type (storage size: 4)
  • 0 - normal
  • 1 - minor stun
  • 2 - major stun
  • 3 - minor knockdown
  • 4 - major knockdown
  • 5 - blownup
  • 6 - pickup
0x10B0 (0xB0 10 00 00) - direction (storage size: 4)
0x2000 (0x00 20 00 00) - ambient sound name (storage size: 16)
0x4000 (0x00 40 00 00) - impulse sound name (storage size: 16)

Actions

Every action takes up 424=0x1A8 bytes. The number of actions is specified at 0x1A in the header.

Bin r 32.gif

Offset Type Raw Hex Value Description
0x00 int32 22 00 00 00 34 Action type: Rotate Y
0x04 int32 00 00 00 00 0 unknown
First output paramter (reference to a variable which the action can modify)
0x00 char[16] 00 "" variable name, if empty this block is not used
0x10 int32 00 00 00 00 0 runtime: storage type
0x14 int32 00 00 00 00 0 runtime: storage offset
First input parameter
0x00 int32 0A 00 00 00 10 value type: int32
0x04 int32 01 00 00 00 1 value (rotation coordinate space)
0x08 not used for int32 values
0x14 not used for int32 values
0x18 not used for int32 values



Emitters

Every emitter takes up 444=0x1BC bytes. The number of emitters is specified at 0x1C in the header. Each emitter has space for 12 parameters but it appears that the last 2 are never used.

Bin r 33.gif

Offset Type Raw Hex Value Description
0x00 char[64] "env_bomb_p09" name of the particle to emit (3RAPenv_bomb_p09.BINA)
0x40 int32 C0 92 62 00 runtime pointer to emitted particle class
0x44 int32 47 00 00 00 0x47 flags; used values:
0x01 00 00 00 - initially on
0x02 00 00 00 - increase particle count
0x04 00 00 00 - turn off at treshold
0x10 00 00 00 - emit with parent velocity
0x20 00 00 00 - ignored?
0x40 00 00 00 - orient to velocity
0x80 00 00 00 - inherit tint
0x00 01 00 00 - one per attractor
0x00 02 00 00 - at least one
0x00 04 00 00 - cycle attractors
0x48 int16 04 00 4 turn off treshold
0x4A uint16 FF FF 65535 emit probability (scaled by 65535)
0x4C float 00 00 20 41 10.000000 amount of (sprite) copies
0x50 int32 00 00 00 00 0 link to:
0 - nothing
1 - this particle
2-9 - to the particle last emitted by emitter 0-7
10 - this particle's link
0x54 int32 00 00 00 00 0 emit rate; can use parameters 1 and 2; possible values (in dec):
0 - continuous (emit interval)
1 - random (min interval, max interval)
2 - instant
3 - distance (distance)
4 - attractor (recharge time, check interval)
0x58 int32 00 00 00 00 0 position; can use parameters 3, 4 and 5; possible values (in dec):
0 - point
1 - line (radius)
2 - circle (inner radius, outer radius)
3 - sphere (inner radius, outer radius)
4 - offset (x, y, z)
5 - cylinder (height, inner radius, outer radius)
6 - body-surface (offset radius)
7 - body-bones (offset radius)
0x5C int32 03 00 00 00 3 direction; can use parameters 6, 7 and 8; possible values (in dec):
0 - straight
1 - random
2 - cone (angle, center bias)
3 - ring (angle, offset)
4 - offset (x, y, z)
5 - inaccurate (base angle, inaccuracy, center bias)
6 - attractor
0x60 int32 00 00 00 00 0 speed; can use parameters 9 and 10; possible values (in dec):
0 - uniform (speed)
1 - stratified (speed 1, speed 2)
0x64 int32 0C 00 00 00 12 orientation dir; possible values (in dec):
0 - parent +X
1 - parent -X
2 - parent +Y
3 - parent -Y
4 - parent +Z
5 - parent -Z
6 - world +X
7 - world -X
8 - world +Y
9 - world -Y
10 - world +Z
11 - world -Z
12 - velocity
13 - reverse-velocity
14 - towards-emitter
15 - awayfrom-emitter
0x68 int32 04 00 00 00 4 orientation up; same possible values as for orientation dir
First emitter parameter
0x00 int32 04 00 00 00 4 value type: random float
0x04 float 00 00 00 3E 0.125000 attractor - recharge time min value
0x08 float 00 00 00 3F 0.500000 attractor - recharge time max value
0x0C not used for random float values
0x14 not used for random float values
0x18 not used for random float values
Direction type Inaccurate vs. Cone
The Inaccurate type was designed for standard ballistic weapons which will have a cone of fire expanding out from the point of origin, therefore it works identically to the Cone type except with an additional factor, "inaccuracy". The "angle" supplied is now a base angle, which is added to by the inaccuracy setting. The "center bias" for Cone and Inaccurate emitters can be positive to pull the dispersion of particles towards the center of the vector, or negative to push them towards the edges of the cone.
The inaccuracy setting is only used if the originating character is an AI or turret. The AI's or turret's shooting skill is looked up and multiplied by the difficulty setting's weapon inaccuracy multiplier (see ONGS), then added to the base angle. With the bias taken into account, and some randomization added by the conical dispersion function, this determines the exact trajectory of the bullet coming from the gun.


ONI BINARY DATA
AKVA << Other file types >> CBPI
BINA : Binary data
ONIE << Other BINA >> SABD
PAR3 : 3D Particle
Level file