OBD:ONWC: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
(added skill indexes used by the vanilla weapons)
 
(81 intermediate revisions by 12 users not shown)
Line 1: Line 1:
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> ONWC File
{{OBD_File_Header | type=ONWC | prev=ONVL | next=OPge | name=Oni Weapon Class | family=Character | align=center}}




<CENTER>[[OBD:ONVL|<==]] <FONT SIZE=5>ONWC File</FONT> [[OBD:OPge|==>]]<BR>
ONWC files in level[1-19]_Final are 0-byte files. The actual data is in the ONWC files of level 0; below is an example.
<FONT SIZE=2>Oni Weapon Class - Level File</FONT></CENTER>


Unless specified otherwise, the coordinates are relative to the weapon's mesh (x = forwards, y = left, z = up).


All ONWC files are 0 byte files. That means, that Oni will take the information out of the ONWC files of level 0. Below is an example of an ONWC file of level 0. The first pic shows the beginning of this file. The second pic the end of it.


==0x000 to 0x0D7 - Weapon main part ==
[[Image:onwc_a.gif]]


http://www.fh-eberswalde.de/user/dkriesch/onistuff/images/onwc_a.gif


http://www.fh-eberswalde.de/user/dkriesch/onistuff/images/onwc_e.gif
{{Table}}
{{OBDth}}
{{OBDtr| 0x000 | res_id  |FF0000| 01 75 0E 00 | 3701          | 03701-w1_tap.ONWC }}
{{OBDtr| 0x004 | lev_id  |FFFF00| 01 00 00 00 | 0              | level 0 }}
|}




{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
===0x008 to 0x053 - Laser sight parameters===
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
{{Table}}
| WIDTH=15% | <B>Hex</B>
{{OBDth}}
| WIDTH=15% | <B>Translation</B>
{{OBDtr| 0x008 | float    |FFC8C8| F5 A4 49 40 | 3.150693       | x-offset of laser sight origin }}
| WIDTH=70% | <B>Meaning</B>
{{OBDtr| 0x00C | float    |FFC8C8| F4 2C A5 3B | 0.005041       | y-offset of laser sight origin }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x010 | float    |FFC8C8| 21 4E D2 3E | 0.410752       | z-offset of laser sight origin }}
| BGCOLOR="#FF0000" | 01 75 0E 00
{{OBDtr| 0x014 | float    |FFC8C8| 23 A6 7F 3F | 0.998629       | x-component of laser sight direction }}
| 3701
{{OBDtr| 0x018 | float    |FFC8C8| AA 6C 56 BD | -0.052349     | y-component of laser sight direction }}
| ALIGN=LEFT | 03701-w1_tap.ONWC
{{OBDtr| 0x01C | float    |FFC8C8| 69 66 AA B7 | -0.000020     | z-component of laser sight direction }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x020 | float    |FFC8C8| 00 40 9C 45 |5000.000000     | maximal length of laser sight vector }}
| BGCOLOR="#FFFF00" | 01 00 00 00
{{OBDtr| 0x024 | color    |FFFFC8| 00 00 FF FF | 0, 0, 255; 255 | laser sight color (blue, green, red); laser sight transparency }}
| 0
{{OBDtr| 0x028 | link    |C8FFC8| 01 94 05 00 | 1428           | crosshair texture (link to 01428-target_1A.[[OBD:TXMP|TXMP]]) }}
| ALIGN=LEFT | level 0
{{OBDtr| 0x02C | color    |C8FFC8| FF FF FF 00 |255, 255, 255; 0| crosshair background color (blue, green, red); crosshair background transparency }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x030 | float    |C8FFC8| CD CC 4C 3F | 0.800000       | crosshair scale factor }}
| BGCOLOR="#FFC8C8" | F5 A4 49 40
{{OBDtr| 0x034 | link    |C8FFFF| 01 95 05 00 | 1428          | locked crosshair texture (link to 01429-target_1B.[[OBD:TXMP|TXMP]]) }}
| 3.150693
{{OBDtr| 0x038 | color    |C8FFFF| FF FF FF 00 |255, 255, 255; 0| locked crosshair background color (blue, green, red); locked crosshair background transparency }}
| ALIGN=LEFT | unknown
{{OBDtr| 0x03C | float    |C8FFFF| CD CC 4C 3F | 0.800000       | locked crosshair scale factor }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x040 | link    |FFC8FF| 00 00 00 00 | unused        | tunnel texture (link to a [[OBD:TXMP|TXMP]]) file }}
| BGCOLOR="#FFC8C8" | F4 2C A5 3B
{{OBDtr| 0x044 | color    |FFC8FF| FF FF FF 00 |255, 255, 255; 0| tunnel background color (blue, green, red); tunnel background transparency }}
| 0.005041
{{OBDtr| 0x048 | float    |FFC8FF| 00 00 80 3F | 1.000000       | tunnel scale factor }}
| ALIGN=LEFT | unknown
{{OBDtr| 0x04C | int32    |FFC800| 0F 00 00 00 | 15             | number of tunnel textures }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x050 | float    |C800C8| 00 00 20 41 | 10.000000     | spacing of tunnel textures }}
| BGCOLOR="#FFC8C8" | 21 4E D2 3E
|}
| 0.410752
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8C8" | 23 A6 7F 3F
| 0.998629
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8C8" | AA 6C 56 BD
| -0.052349
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8C8" | 69 66 AA B7
| -0.000020
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8C8" | 00 40 9C 45
| 5000.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 00 00 FF FF
| -65535
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFC8" | 01 94 05 00
| 1428
| ALIGN=LEFT | link to 01428-target_1A.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFC8" | FF FF FF 00
| -256
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFC8" | CD CC 4C 3F
| 0.800000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 01 95 05 00
| 1429
| ALIGN=LEFT | link to 01429-target_1B.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | FF FF FF 00
| -256
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | CD CC 4C 3F
| 0.800000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8FF" | 00 00 00 00
| not used
| ALIGN=LEFT | link to a [[OBD:TXMP|TXMP]] file
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8FF" | FF FF FF 00
| -256
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8FF" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC800" | 0F 00 00 00
| 15
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C800C8" | 00 00 20 41
| 10.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C87C64" | 01 7E 0E 00
| 3710
| ALIGN=LEFT | link to 03710-tap_icon.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C87C64" | 01 7F 0E 00
| 3711
| ALIGN=LEFT | link to 03711-tap_empty.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C87C64" | 01 80 0E 00
| 3712
| ALIGN=LEFT | link to 03712-tap_fill.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C87C64" | 01 76 0E 00
| 3702
| ALIGN=LEFT | link to 03702-.[[OBD:M3GM|M3GM]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#B0C3D4" COLSPAN=2 | <TT>w1_tap</TT>
| ALIGN=LEFT | name of the weapon
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | A6 92 2B 3D
| 0.041888
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 92 0A 86 3E
| 0.261799
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 A0 40
| 5.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | E2 A3 7B 3B
| 0.003839
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 88 C3 E4 3A
| 0.001745
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 95 00
| 149
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | A4 00
| 164
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 19 00
| 25
| ALIGN=LEFT | pause after reload in 1/60 seconds
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 0A 00
| 10
| ALIGN=LEFT | amount of shots
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 06 00
| 6
| ALIGN=LEFT | amount of used packages (the file contains space for 16 packages)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 01 00
| 1
| ALIGN=LEFT | amount of shot modes
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 0A 00
| 10
| ALIGN=LEFT | pause before reload in 1/60 seconds
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 04 00
| 4
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 30
| 48
| ALIGN=LEFT | weapon options 1; the options are stored as bitsets, so the following options are possible (values in dec):




{| BORDER=0 CELLPADDING=0 CELLSPACING=0
;Crosshair
|- VALIGN=TOP
:Default crosshair appears where the laser sight hits environment, corpses, etc.
| ALIGN=RIGHT | 1 -&nbsp;
:Locked crosshair appears when the laser sight hits characters (including the shooter)
| unknown, never used
:"Tunnel" is used by '''w8_mbo''' as a complement to the crosshair
|- VALIGN=TOP
:'''w2_sap''', '''w5_sbg''', '''w7_scc''' and '''w9_scr''' use it with no crosshair
| ALIGN=RIGHT | 2 -&nbsp;
 
| weapon can't be holstered
 
|- VALIGN=TOP
===0x054 to 0x05F - Ammo meter===
| ALIGN=RIGHT | 4 -&nbsp;
{{Table}}
| weapon reloads with energy cells
{{OBDth}}
|- VALIGN=TOP
{{OBDtr| 0x054 | link    |C87C64| 01 7E 0E 00 | 3710          | link to 03710-tap_icon.[[OBD:TXMP|TXMP]] }}
| ALIGN=RIGHT | 8 -&nbsp;
{{OBDtr| 0x058 | link    |C87C64| 01 7F 0E 00 | 3711          | link to 03711-tap_empty.[[OBD:TXMP|TXMP]] }}
| weapon is a rifle (two-handed)
{{OBDtr| 0x05C | link    |C87C64| 01 80 0E 00 | 3712          | link to 03712-tap_fill.[[OBD:TXMP|TXMP]] }}
|- VALIGN=TOP
| ALIGN=RIGHT | 16 -&nbsp;
| unknown, used for w1_tap and w2_sap
|- VALIGN=TOP
| ALIGN=RIGHT | 32 -&nbsp;
| sustained fire
|- VALIGN=TOP
| ALIGN=RIGHT | 64 -&nbsp;
| you can't shoot ...
|- VALIGN=TOP
| ALIGN=RIGHT | 128 -&nbsp;
| unknown, used for w6_vdg
|}
|}




|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
===0x060 to 0x0D7 - Weapon parameters===
| BGCOLOR="#FFDDDD" | C0
{{Table}}
| 192
{{OBDth}}
| ALIGN=LEFT | weapon options 2; the options are stored as bitsets, so the following options are possible (values in dec):
{{OBDtr| 0x060 | link    |C87C64| 01 76 0E 00 | 3702          | link to 03702-.M3GM }}
{{OBDtr2|0x064 | char[32] |B0C3D4| w1_tap                      | weapon name }}
{{OBDtr| 0x084 | float    |E7CEA5| 00 00 80 3F | 1.000000      | weapon mouse sensitivity (applies to AI, too) }}
{{OBDtr| 0x088 | float    |E7CEA5| A6 92 2B 3D | 0.041888      | recoil base (e.g. for w1_tap and w2_sap) }}
{{OBDtr| 0x08C | float    |E7CEA5| 92 0A 86 3E | 0.261799      | recoil max }}
{{OBDtr| 0x090 | float    |E7CEA5| 00 00 A0 40 | 5.000000      | recoil factor }}
{{OBDtr| 0x094 | float    |E7CEA5| E2 A3 7B 3B | 0.003839      | recoil return speed }}
{{OBDtr| 0x098 | float    |E7CEA5| 88 C3 E4 3A | 0.001745      | recoil firing return speed }}
{{OBDtr| 0x09C | float    |E7CEA5| 00 00 00 00 | 0.000000      | secondHandVector X (disabled IK stuff) }}
{{OBDtr| 0x0A0 | float    |E7CEA5| 00 00 00 00 | 0.000000      | secondHandVector Y}}
{{OBDtr| 0x0A4 | float    |E7CEA5| 00 00 00 00 | 0.000000      | secondHandVector Z }}
{{OBDtr| 0x0A8 | float    |E7CEA5| 00 00 00 00 | 0.000000      | secondHandUpVector X}}
{{OBDtr| 0x0AC | float    |E7CEA5| 00 00 00 00 | 0.000000      | secondHandUpVector Y}}
{{OBDtr| 0x0B0 | float    |E7CEA5| 00 00 00 00 | 0.000000      | secondHandUpVector Z}}
{{OBDtr| 0x0B4 | float    |E7CEA5| 00 00 00 00 | 0.000000      | secondHandPosition X}}
{{OBDtr| 0x0B8 | float    |E7CEA5| 00 00 00 00 | 0.000000      | secondHandPosition Y}}
{{OBDtr| 0x0BC | float    |E7CEA5| 00 00 00 00 | 0.000000      | secondHandPosition Z}}
{{OBDtr| 0x0C0 | int16    |FFDDDD| 00 00      | 0              | freeTime (unused); always zero }}
{{OBDtr| 0x0C2 | int16    |FFDDDD| 95 00      | 149            | recoil animation type (149 {{=}} autopistol_recoil) }}
{{OBDtr| 0x0C4 | int16    |FFDDDD| A4 00      | 164            | reload animation type (164 {{=}} reload_pistol) }}
{{OBDtr| 0x0C6 | int16    |FFDDDD| 19 00      | 25            | pause after reload in 1/60 seconds }}
{{OBDtr| 0x0C8 | int16    |FFDDDD| 0A 00      | 10            | amount of shots }}
{{OBDtr| 0x0CA | int16    |FFDDDD| 06 00      | 6              | amount of particles }}
{{OBDtr| 0x0CC | int16    |FFDDDD| 01 00      | 1              | amount of firing modes }}
{{OBDtr| 0x0CE | int16    |FFDDDD| 0A 00      | 10            | pause before reload in 1/60 seconds }}
{{OBDtr| 0x0D0 | int16    |FFDDDD| 04 00      | 4              | release delay; delay between the moment the trigger is released and the moment the weapon stops firing }}
{{OBDtr| 0x0D2 | int16    |FFDDDD| 00 00      | 0              | padding; always zero }}
{{OBDtr| 0x0D4 | int32    |FFDDDD| 30          | 0x30 C0 02 00  | weapon options; the following bits are possible (values in hex):


:0x'''02''' 00 00 00 - weapon can't be holstered
:0x'''04''' 00 00 00 - weapon reloads with energy cells
:0x'''08''' 00 00 00 - weapon is a rifle (two-handed)
:0x'''10''' 00 00 00 - recoil affects aiming
:0x'''20''' 00 00 00 - sustained fire (applies only to primary fire)
:0x'''40''' 00 00 00 - runtime only; do not use
:0x'''80''' 00 00 00 - stun switcher; used for w6_vdg, see below


{| BORDER=0 CELLPADDING=0 CELLSPACING=0
:0x00 '''01''' 00 00 - knockdown switcher; used for w4_psm, see below
|- VALIGN=TOP
:0x00 '''02''' 00 00 - explosive; used for w5_sbg and w11_ba1
| ALIGN=RIGHT | 1 -&nbsp;
:0x00 '''04''' 00 00 - secondary fire enabled
| unknown, used for w4_psm
:0x00 '''08''' 00 00 - barabbas weapon; see below
|- VALIGN=TOP
:0x00 '''10''' 00 00 - heavy weapon; run, jump and creep disabled
| ALIGN=RIGHT | 2 -&nbsp;
:0x00 '''20''' 00 00 - auto release trigger; used for w11_ba1
| unknown, used for w5_sbg and w11_ba1
:0x00 '''40''' 00 00 - has release delay; see the release delay field above
|- VALIGN=TOP
:0x00 '''80''' 00 00 - laser sight visible
| ALIGN=RIGHT | 4 -&nbsp;
 
| secondary fire enabled
:0x00 00 '''02''' 00 - crosshair scaling, used for w1_tap, w2_sap, w3_phr and w8_mbo
|- VALIGN=TOP
:0x00 00 '''08''' 00 - weapon doesn't fade
| ALIGN=RIGHT | 8 -&nbsp;
:0x00 00 '''10''' 00 - drain ammo; used by w4_psm to decrement ammo while firing because its firing mode is continuous rather than repetitive
| weapon can't be reloaded
}}
|- VALIGN=TOP
| ALIGN=RIGHT | 16 -&nbsp;
| run, jump and creep disabled
|- VALIGN=TOP
| ALIGN=RIGHT | 32 -&nbsp;
| unknown, used for w11_ba1
|- VALIGN=TOP
| ALIGN=RIGHT | 64 -&nbsp;
| unknown, used for w1_tap, w2_sap and w3_phr
|- VALIGN=TOP
| ALIGN=RIGHT | 128 -&nbsp;
| red line visible
|}
|}




|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
'''stun switcher''' - if enemy is inside shooting distance (between min and max) and is '''knockdown'''ed/'''stun'''ed or '''blownup'''ped, AI with this weapon switches to melee for a time specified in a *fight timer* field
| BGCOLOR="#FFDDDD" | 02 00
| 2
| ALIGN=LEFT | weapon options 3; the options are stored as bitsets, so the following options are possible (values in dec):


'''knockdown switcher''' -  if enemy is inside shooting distance (between min and max) and is '''knockdown'''ed or '''blownup'''ped, AI with this weapon switches to melee for a time specified in a *fight timer* field


{| BORDER=0 CELLPADDING=0 CELLSPACING=0
'''barabbas weapon''' - reload disabled; also used for ai2_barabbas_retrievegun (it teleports a weapon to a character); nearest available gun becomes chosen if character had no weapon to begin, then always this weapon is teleported back to character (when command used again)
|- VALIGN=TOP
 
| ALIGN=RIGHT | 1 -&nbsp;
==0x0D8 to 0x1D7 - Firing modes==
| unknown, never used
Every ONWC has 2 firing mode slots (128 = 0x80 bytes each.)
|- VALIGN=TOP
 
| ALIGN=RIGHT | 2 -&nbsp;
The number of slots actually used by the weapon is specified at 0xCA.
| unknown, used for w1_tap, w2_sap, w3_phr and w8_mbo
 
|- VALIGN=TOP
===0x0D8 to 0x157 - Primary firing mode===
| ALIGN=RIGHT | 4 -&nbsp;
{{Table}}
| unknown, never used
{{OBDth}}
|- VALIGN=TOP
{{OBDtr| 0x0D8 | int32    |64AAAA| 00 00 00 00 | 0              | firing mode options; only the following bit is used (value in hex):
| ALIGN=RIGHT | 8 -&nbsp;
:0x'''01''' 00 00 00 - No wild shots}}
| unknown, used for w11_ba1
 
|- VALIGN=TOP
{{OBDtrMatrix4x3|0x0DC|EBEBEB|23 A6 7F 3F|05 6D 56 3D|F4 8D A9 37|05 6D 56 BD|23 A6 7F 3F|D0 1D 0E B5|F4 8D A9 B7|D0 1D 0E B5|00 00 80 3F|00 00 00 00|00 00 00 00|00 00 00 00|0.998629|0.052350|0.000020| -0.052350|0.998629| -0.000001| -0.000020| -0.000001|1.000000|0.000000|0.000000|0.000000| targeting inverse transform matrix - the inverse of the matrix that gives the targeting direction}}
| ALIGN=RIGHT | 16 -&nbsp;
 
| unknown, used for w4_psm
{{OBDtrVector3| 0x10C |EBEBEB| 23 A6 7F 3F | AE 6C 56 BD | AF 8D A9 B7 | 0.998629 | -0.052349 | -0.000020 | targeting direction; sets orientation of firingspread }}
|- VALIGN=TOP
{{OBDtrVector3| 0x118 |EBEBEB| DC FE 08 3C | 5C 11 23 3E | 39 C6 2A 3F | 0.008362 | 0.159246 | 0.667087 | targeting origin; sets deviation of AI's aim from target's origin (target's origin + this vector {{=}} direction where to aim and fire) }}
| ALIGN=RIGHT | 32 -&nbsp;
{{OBDtr| 0x124 | float    |EBEBEB| 00 00 61 44 | 900.000000    | prediction speed; the speed of the projectile that AI prediction should take into account when calculating where to fire in order to hit a moving target }}
| unknown, never used
{{OBDtr| 0x128 | float    |EBEBEB| 00 00 20 41 | 10.000000      | max. inaccuracy angle; sets max angle between weapon's aiming vector and target's position; when AI exceeds this angle (by recoil or target running away), AI stops shooting and aims weapon again straight to the target, then resume shooting }}
|- VALIGN=TOP
{{OBDtr| 0x12C | float    |EBEBEB| 00 00 20 40 | 2.500000      | aim_radius; always the same; possibly related to the inaccuracy angle above }}
| ALIGN=RIGHT | 64 -&nbsp;
{{OBDtr| 0x130 | float    |EBEBEB| 00 00 96 43 | 300.000000    | weapon sound sphere radius; defines radius of the AI sound sphere (gunfire type, see [[AI#Vision and hearing|HERE]] about AI sound spheres) which is created for a short moment when this weapon is fired }}
| unknown, never used
{{OBDtr| 0x134 | float    |EBEBEB| 00 00 40 41 | 12.000000      | minimal shooting distance; if target is closer than this, the AI ceases fire and moves away from the target till at least this distance is achieved; this is a '''diameter, not a radius''', so effective distance from AI to target is half of this value }}
|- VALIGN=TOP
{{OBDtr| 0x138 | float    |EBEBEB| 00 00 61 44 | 900.000000    | maximum shooting distance; if target is further than this, the AI ceases fire and moves towards the target until it is below this distance }}
| ALIGN=RIGHT | 128 -&nbsp;
{{OBDtr| 0x13C | int16    |8C8CCC| 05 00      | 5              | UNUSED; maximum startle misses; the maximum number of shots to which extra inaccuracy can be added when an AI begins firing at the player (always 5, but Oni does not use this field) }}
| unknown, never used
{{OBDtr| 0x13E | int16    |8C8CCC| 01 00      | 1              | skill index (links weapon to the [[ONCC]] shooting skill table); here are the values used by Oni's ONWCs:
:0x'''01''' 00 - w0_sec (not in game)
:0x'''02''' 00 - w1_tap
:0x'''04''' 00 - w2_sap
:0x'''08''' 00 - w3_phr
:0x'''10''' 00 - w4_psm
:0x'''20''' 00 - w5_sbg
:0x'''40''' 00 - w6_vdg
:0x'''80''' 00 - w7_scc
:0x00 '''01''' - w8_mbo
:0x00 '''02''' - w9_scr
:0x00 '''04''' - w10_sni (not in game)
:0x00 '''08''' - w11_ba1
:0x00 '''10''' - w12_ba2}}
{{OBDtr| 0x140 | int32    |8C8CCC| 00 00 00 00 | 0              | fight timer, 240 for w4_psm, 200 for v6_vdg }}
{{OBDtr| 0x144 | float    |FF00C8| 00 00 00 00 | 0.000000      | ballistic projectile speed for AI prediction purposes; if this field is unused, the projectile is assumed to be infinite speed; field is always zero except 150 for Superball Gun and 160 for Wave Motion Cannon's secondary trigger }}
{{OBDtr| 0x148 | float    |FF00C8| 00 00 00 00 | 0.000000      | ballistic projectile gravity for AI prediction purposes; always zero except 0.5 for SBG and 0.3 for WMC's secondary trigger }}
{{OBDtr| 0x14C | float    |FF00C8| 00 00 34 43 | 180.000000    | length of a firing spread; AI will perform gunfire dodging when it finds itself inside of a firing spread (see {{SectionLink|AI|Basic combat behaviors}}); can be visualized with *ai2_showfiringspreads{{=}}1* (180 for w1_tap, 150 for w2_sap, 120 for w4_psm) }}
{{OBDtr| 0x150 | float    |FF00C8| 00 00 40 40 | 3.000000      | width of the firing spread's base; can be seen by ai2_showfiringspreads{{=}}1 }}
{{OBDtr| 0x154 | float    |FF00C8| 50 77 D6 3D | 0.104719      | firing spread's skew; can be seen by ai2_showfiringspreads{{=}}1 (0.1 for w1_tap, 0.21 for w2_sap) }}
|}
|}




|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
;Transform matrix
| BGCOLOR="#FFDDDD" | 00 00
:Probably defines the orientation, scaling and position of the firing spread. It doesn't appear to be used.
| 0
 
| ALIGN=LEFT | unknown
===0x158 to 0x1D7 - Secondary firing mode===
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
The only vanilla weapon for which these fields are not all zero is '''w11_ba1'''. They are the exact counterparts of the fields at 0xD8 - 0x157.
| BGCOLOR="#FFDDDD" | 00 00
 
| 0
==0x1D8 to 0x6D7 - Weapon particle array==
| ALIGN=LEFT | unknown; always zero
Every ONWC has 16 particle slots (80 at 0x50 bytes each). The number of slots actually used by the weapon is specified at 0xCA. Offsets are relative to the beginning of a slot.
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
 
| BGCOLOR="#64AAAA" | 23 A6 7F 3F
 
| 0.998629
{{Table}}
| ALIGN=LEFT | unknown
{{OBDth}}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtrBK|1=First of 16 elements (black outline).}}
| BGCOLOR="#64AAAA" | 05 6D 56 3D
{{OBDtr| 0x000 | float    |F0F096| AE 6C 56 3D | 0.052349       | transformation matrix, xx term }}
| 0.052350
{{OBDtr| 0x004 | float    |F0F096| 23 A6 7F 3F | 0.998629      | transformation matrix, xy term }}
| ALIGN=LEFT | unknown
{{OBDtr| 0x008 | float    |F0F096| C2 53 90 B3 | -0.000000...   | transformation matrix, xz term }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x00C | float    |F0F096| 23 A6 7F 3F | 0.998629       | transformation matrix, yx term }}
| BGCOLOR="#64AAAA" | F4 8D A9 37
{{OBDtr| 0x010 | float    |F0F096| AE 6C 56 BD | -0.052349     | transformation matrix, yy term }}
| 0.000020
{{OBDtr| 0x014 | float    |F0F096| AF 8D A9 B7 | -0.000020     | transformation matrix, yz term }}
| ALIGN=LEFT | unknown
{{OBDtr| 0x018 | float    |F0F096| BA 59 A9 B7 | -0.000020     | transformation matrix, zx term }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x01C | float    |F0F096| 5B 02 85 35 | 0.000001       | transformation matrix, zy term }}
| BGCOLOR="#64AAAA" | 05 6D 56 BD
{{OBDtr| 0x020 | float    |F0F096| 00 00 80 BF | -1.000000     | transformation matrix, zz term }}
| -0.052350
{{OBDtr| 0x024 | float    |F0F096| 6F 63 57 40 | 3.365444       | x-offset of particle to weapon }}
| ALIGN=LEFT | unknown
{{OBDtr| 0x028 | float    |F0F096| B3 1D 89 BC | -0.016738     | y-offset of particle to weapon }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x02C | float    |F0F096| C5 C1 2A 3F | 0.667019       | z-offset of particle to weapon }}
| BGCOLOR="#64AAAA" | 23 A6 7F 3F
{{OBDtr2|0x030 | char[16] |00C864| w1_tap_e01                   | particle name (reference to 06226-3RAPw1_tap_e01.[[OBD:BINA/PAR3|BINA]]) }}
| 0.998629
{{OBDtr| 0x040 | int32    |00C8FF| 00 00 00 00 | 0             | runtime only (pointer to particle class) }}
| ALIGN=LEFT | unknown
{{OBDtr| 0x044 | int16    |00C8FF| 01 00       | 1             | ammo decrement (different for the 2 firing modes of w11_ba1) }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x046 | int16    |00C8FF| 0C 00       | 12             | delay between shots in frames (12 frames {{=}} 0.2 seconds) }}
| BGCOLOR="#64AAAA" | D0 1D 0E B5
{{OBDtr| 0x048 | int16    |00C8FF| 04 00       | 4             | 'roughjustice' delay between shots in frames }}
| -0.000001
{{OBDtr| 0x04A | int16    |00C8FF| 00 00       | 0             | number in frames for active firing mode (1st frame for activate); Used for w4_psm and w11_ba1 }}
| ALIGN=LEFT | unknown
{{OBDtr| 0x04C | int16    |00C8FF| 00 00       | 0             | 0 {{=}} particle is triggered by fire1; 1 {{=}} particle is triggered by fire2; -1 {{=}} particle is triggered by both firing modes }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x04E | int16    |00C8FF| 00 00       | 0             | delay before firing }}
| BGCOLOR="#64AAAA" | F4 8D A9 B7
| -0.000020
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | D0 1D 0E B5
| -0.000001
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 23 A6 7F 3F
| 0.998629
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | AE 6C 56 BD
| -0.052349
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | AF 8D A9 B7
| -0.000020
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | DC FE 08 3C
| 0.008362
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 5C 11 23 3E
| 0.159246
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 39 C6 2A 3F
| 0.667087
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 61 44
| 900.000000
| ALIGN=LEFT | range of fire
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 20 41
| 10.000000
| ALIGN=LEFT | scattering angle ? / slice ?
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 20 40
| 2.500000
| ALIGN=LEFT | unknown; always the same
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 96 43
| 300.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 40 41
| 12.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 61 44
| 900.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#EBEBEB" | 05 00
| 5
| ALIGN=LEFT | unknown; always the same
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#EBEBEB" | 01 00
| 1
| ALIGN=LEFT | weapon ID
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#EBEBEB" | 00 00 00 00
| 0
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 34 43
| 180.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 40 40
| 3.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 50 77 D6 3D
| 0.104719
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00
| 0
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00
| 0
| ALIGN=LEFT | unknown; only w11_ba1 use it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#000000"
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">Below follows the first package.</FONT>
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | 23 A6 7F 3F
| 0.998629
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | C2 53 90 B3
| -6.720757e-8
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | 23 A6 7F 3F
| 0.998629
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | AE 6C 56 BD
| -0.052349
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | AF 8D A9 B7
| -0.000020
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | BA 59 A9 B7
| -0.000020
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | 5B 02 85 35
| 0.000001
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | 00 00 80 BF
| -1.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | 6F 63 57 40
| 3.365444
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | B3 1D 89 BC
| -0.016738
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | C5 C1 2A 3F
| 0.667019
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#F0F096" COLSPAN=2 | <TT>w1_tap_e01</TT>
| ALIGN=LEFT | weapon particle (06226-3RAPw1_tap_e01.BINA)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 01 00
| 1
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 0C 00
| 12
| ALIGN=LEFT | shot frequency in 1/60 seconds (12/60 = 0.2 = 1 shot per 0.2 seconds)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 04 00
| 4
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#000000"
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">Below follows the end of the ONWC file.</FONT>
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C8FF" COLSPAN=2 | <TT>weapon _empty</TT>
| ALIGN=LEFT | empty weapon sound<BR>(08992-weapon_empty.grp.[[OBD:OSBD|OSBD]])<BR>(08993-weapon_empty.imp.[[OBD:OSBD|OSBD]])
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C80040" | 00 00 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFCD96" | 01 81 0E 00
| 3713
| ALIGN=LEFT | link to 03713-w1_glow.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFCD96" | 01 82 0E 00
| 3714
| ALIGN=LEFT | link to 03714-w1_glow_ammo.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8C864" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8C864" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8C864" | 76 65 EB 3F
| 1.839034
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8C864" | 96 4C A9 3D
| 0.082666
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8C864" | 06 E2 14 3E
| 0.145393
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8C864" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#0096C8" | AD DE
| dead
| ALIGN=LEFT | not used
|}
|}




<HR>
;Transformation matrix
:That's what defines orientation, stretching, etc. See [[OBD:CRSA|CRSA]] for details.
 
==0x6D8 to 0x71F - End of file==
[[Image:onwc_e.gif]]
 


{{Table}}
{{OBDth}}
{{OBDtr2|0x6D8 | char[32] |C80040| weapon _empty                | empty weapon sound (reference to 08993-weapon_empty.[[OBD:OSBD/OSIm|imp.OSBD]]) }}
{{OBDtr| 0x6F8 | int32    |FFCD96| 00 00 00 00 | 0              | runtime only (pointer to empty weapon sound) }}
{{OBDtr| 0x6FC | link    |C8C864| 01 81 0E 00 | 3713          | link to 03713-w1_glow.[[OBD:TXMP|TXMP]] }}
{{OBDtr| 0x700 | link    |C8C864| 01 82 0E 00 | 3714          | link to 03714-w1_glow_ammo.[[OBD:TXMP|TXMP]] }}
{{OBDtr| 0x704 | float    |0096C8| 00 00 80 3F | 1.000000      | x-scale factor of glow textures }}
{{OBDtr| 0x708 | float    |0096C8| 00 00 80 3F | 1.000000      | z-scale factor of glow textures }}
{{OBDtr| 0x70C | float    |0096C8| 76 65 EB 3F | 1.839034      | x-offset of pickup handle }}
{{OBDtr| 0x710 | float    |0096C8| 96 4C A9 3D | 0.082666      | y-offset of pickup handle }}
{{OBDtr| 0x714 | float    |0096C8| 06 E2 14 3E | 0.145393      | z-offset of pickup handle }}
{{OBDtr| 0x718 | float    |0096C8| 00 00 00 00 | 0.000000      | hovering height of dropped weapon }}
{{OBDtr| 0x71C | char[4]  |FF80C0| AD DE      | dead          | unused }}
|}


<CENTER>Here you can download the complete overview of all used different ONWC files as a text file.<BR>Copy it to a spreadsheet calculation program like Excel.<BR><UL><LI>[http://www.fh-eberswalde.de/user/dkriesch/onistuff/subfold/text/oni_onwc_dc.txt text file] with commas as decimal hyphens (27 kb)</LI><LI>[http://www.fh-eberswalde.de/user/dkriesch/onistuff/subfold/text/oni_onwc_dp.txt text file] with points as decimal hyphens (27 kb)</LI></UL></CENTER>


;Glow textures
:They're applied to the lower face of the M3GM's bounding box. The factors above are the ratio between the x/z extent of that face and the half-length/width of the glow textures. So if both factors are 0.5, the glow textures fit the bounding box exactly.
;Pickup handle
:The tolerance is hardcoded. The offsets are not relative to the weapon's axes, but to the world axes (!). This is a rather nasty "feature" because the offsets should be relative to the weapon's orientation. The way it is now, the pickup volume of a weapon is not necessarily next to the handle. That's why the WMC is so hard to pick up that some players conclude it's not possible; being the largest weapon, it has the largest potential discrepancy between its visual handle location and its pickup volume.


<HR>
<CENTER>[[OBD:ONVL|<==]] <B>ONWC File</B> [[OBD:OPge|==>]]</CENTER>
<HR>


{{OBD_File_Footer | type=ONWC | prev=ONVL | next=OPge | name=Oni Weapon Class | family=Character}}


[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> ONWC File
{{OBD}}

Latest revision as of 17:58, 19 May 2024

ONI BINARY DATA
ONVL << Other file types >> OPge
ONWC : Oni Weapon Class
switch to XML:ONWC page
Overview @ Oni Stuff
OBD.png


ONWC files in level[1-19]_Final are 0-byte files. The actual data is in the ONWC files of level 0; below is an example.

Unless specified otherwise, the coordinates are relative to the weapon's mesh (x = forwards, y = left, z = up).


0x000 to 0x0D7 - Weapon main part

Onwc a.gif


Offset Type Raw Hex Value Description
0x000 res_id 01 75 0E 00 3701 03701-w1_tap.ONWC
0x004 lev_id 01 00 00 00 0 level 0


0x008 to 0x053 - Laser sight parameters

Offset Type Raw Hex Value Description
0x008 float F5 A4 49 40 3.150693 x-offset of laser sight origin
0x00C float F4 2C A5 3B 0.005041 y-offset of laser sight origin
0x010 float 21 4E D2 3E 0.410752 z-offset of laser sight origin
0x014 float 23 A6 7F 3F 0.998629 x-component of laser sight direction
0x018 float AA 6C 56 BD -0.052349 y-component of laser sight direction
0x01C float 69 66 AA B7 -0.000020 z-component of laser sight direction
0x020 float 00 40 9C 45 5000.000000 maximal length of laser sight vector
0x024 color 00 00 FF FF 0, 0, 255; 255 laser sight color (blue, green, red); laser sight transparency
0x028 link 01 94 05 00 1428 crosshair texture (link to 01428-target_1A.TXMP)
0x02C color FF FF FF 00 255, 255, 255; 0 crosshair background color (blue, green, red); crosshair background transparency
0x030 float CD CC 4C 3F 0.800000 crosshair scale factor
0x034 link 01 95 05 00 1428 locked crosshair texture (link to 01429-target_1B.TXMP)
0x038 color FF FF FF 00 255, 255, 255; 0 locked crosshair background color (blue, green, red); locked crosshair background transparency
0x03C float CD CC 4C 3F 0.800000 locked crosshair scale factor
0x040 link 00 00 00 00 unused tunnel texture (link to a TXMP) file
0x044 color FF FF FF 00 255, 255, 255; 0 tunnel background color (blue, green, red); tunnel background transparency
0x048 float 00 00 80 3F 1.000000 tunnel scale factor
0x04C int32 0F 00 00 00 15 number of tunnel textures
0x050 float 00 00 20 41 10.000000 spacing of tunnel textures


Crosshair
Default crosshair appears where the laser sight hits environment, corpses, etc.
Locked crosshair appears when the laser sight hits characters (including the shooter)
"Tunnel" is used by w8_mbo as a complement to the crosshair
w2_sap, w5_sbg, w7_scc and w9_scr use it with no crosshair


0x054 to 0x05F - Ammo meter

Offset Type Raw Hex Value Description
0x054 link 01 7E 0E 00 3710 link to 03710-tap_icon.TXMP
0x058 link 01 7F 0E 00 3711 link to 03711-tap_empty.TXMP
0x05C link 01 80 0E 00 3712 link to 03712-tap_fill.TXMP


0x060 to 0x0D7 - Weapon parameters

Offset Type Raw Hex Value Description
0x060 link 01 76 0E 00 3702 link to 03702-.M3GM
0x064 char[32] w1_tap weapon name
0x084 float 00 00 80 3F 1.000000 weapon mouse sensitivity (applies to AI, too)
0x088 float A6 92 2B 3D 0.041888 recoil base (e.g. for w1_tap and w2_sap)
0x08C float 92 0A 86 3E 0.261799 recoil max
0x090 float 00 00 A0 40 5.000000 recoil factor
0x094 float E2 A3 7B 3B 0.003839 recoil return speed
0x098 float 88 C3 E4 3A 0.001745 recoil firing return speed
0x09C float 00 00 00 00 0.000000 secondHandVector X (disabled IK stuff)
0x0A0 float 00 00 00 00 0.000000 secondHandVector Y
0x0A4 float 00 00 00 00 0.000000 secondHandVector Z
0x0A8 float 00 00 00 00 0.000000 secondHandUpVector X
0x0AC float 00 00 00 00 0.000000 secondHandUpVector Y
0x0B0 float 00 00 00 00 0.000000 secondHandUpVector Z
0x0B4 float 00 00 00 00 0.000000 secondHandPosition X
0x0B8 float 00 00 00 00 0.000000 secondHandPosition Y
0x0BC float 00 00 00 00 0.000000 secondHandPosition Z
0x0C0 int16 00 00 0 freeTime (unused); always zero
0x0C2 int16 95 00 149 recoil animation type (149 = autopistol_recoil)
0x0C4 int16 A4 00 164 reload animation type (164 = reload_pistol)
0x0C6 int16 19 00 25 pause after reload in 1/60 seconds
0x0C8 int16 0A 00 10 amount of shots
0x0CA int16 06 00 6 amount of particles
0x0CC int16 01 00 1 amount of firing modes
0x0CE int16 0A 00 10 pause before reload in 1/60 seconds
0x0D0 int16 04 00 4 release delay; delay between the moment the trigger is released and the moment the weapon stops firing
0x0D2 int16 00 00 0 padding; always zero
0x0D4 int32 30 0x30 C0 02 00 weapon options; the following bits are possible (values in hex):
0x02 00 00 00 - weapon can't be holstered
0x04 00 00 00 - weapon reloads with energy cells
0x08 00 00 00 - weapon is a rifle (two-handed)
0x10 00 00 00 - recoil affects aiming
0x20 00 00 00 - sustained fire (applies only to primary fire)
0x40 00 00 00 - runtime only; do not use
0x80 00 00 00 - stun switcher; used for w6_vdg, see below
0x00 01 00 00 - knockdown switcher; used for w4_psm, see below
0x00 02 00 00 - explosive; used for w5_sbg and w11_ba1
0x00 04 00 00 - secondary fire enabled
0x00 08 00 00 - barabbas weapon; see below
0x00 10 00 00 - heavy weapon; run, jump and creep disabled
0x00 20 00 00 - auto release trigger; used for w11_ba1
0x00 40 00 00 - has release delay; see the release delay field above
0x00 80 00 00 - laser sight visible
0x00 00 02 00 - crosshair scaling, used for w1_tap, w2_sap, w3_phr and w8_mbo
0x00 00 08 00 - weapon doesn't fade
0x00 00 10 00 - drain ammo; used by w4_psm to decrement ammo while firing because its firing mode is continuous rather than repetitive


stun switcher - if enemy is inside shooting distance (between min and max) and is knockdowned/stuned or blownupped, AI with this weapon switches to melee for a time specified in a *fight timer* field

knockdown switcher - if enemy is inside shooting distance (between min and max) and is knockdowned or blownupped, AI with this weapon switches to melee for a time specified in a *fight timer* field

barabbas weapon - reload disabled; also used for ai2_barabbas_retrievegun (it teleports a weapon to a character); nearest available gun becomes chosen if character had no weapon to begin, then always this weapon is teleported back to character (when command used again)

0x0D8 to 0x1D7 - Firing modes

Every ONWC has 2 firing mode slots (128 = 0x80 bytes each.)

The number of slots actually used by the weapon is specified at 0xCA.

0x0D8 to 0x157 - Primary firing mode

Offset Type Raw Hex Value Description
0x0D8 int32 00 00 00 00 0 firing mode options; only the following bit is used (value in hex):
0x01 00 00 00 - No wild shots
0x0DC matrix4x3
23 A6 7F 3F 05 6D 56 3D F4 8D A9 37
05 6D 56 BD 23 A6 7F 3F D0 1D 0E B5
F4 8D A9 B7 D0 1D 0E B5 00 00 80 3F
00 00 00 00 00 00 00 00 00 00 00 00
0.998629 0.052350 0.000020
-0.052350 0.998629 -0.000001
-0.000020 -0.000001 1.000000
0.000000 0.000000 0.000000
targeting inverse transform matrix - the inverse of the matrix that gives the targeting direction


0x10C vector3
23 A6 7F 3F AE 6C 56 BD AF 8D A9 B7
0.998629 -0.052349 -0.000020
targeting direction; sets orientation of firingspread
0x118 vector3
DC FE 08 3C 5C 11 23 3E 39 C6 2A 3F
0.008362 0.159246 0.667087
targeting origin; sets deviation of AI's aim from target's origin (target's origin + this vector = direction where to aim and fire)
0x124 float 00 00 61 44 900.000000 prediction speed; the speed of the projectile that AI prediction should take into account when calculating where to fire in order to hit a moving target
0x128 float 00 00 20 41 10.000000 max. inaccuracy angle; sets max angle between weapon's aiming vector and target's position; when AI exceeds this angle (by recoil or target running away), AI stops shooting and aims weapon again straight to the target, then resume shooting
0x12C float 00 00 20 40 2.500000 aim_radius; always the same; possibly related to the inaccuracy angle above
0x130 float 00 00 96 43 300.000000 weapon sound sphere radius; defines radius of the AI sound sphere (gunfire type, see HERE about AI sound spheres) which is created for a short moment when this weapon is fired
0x134 float 00 00 40 41 12.000000 minimal shooting distance; if target is closer than this, the AI ceases fire and moves away from the target till at least this distance is achieved; this is a diameter, not a radius, so effective distance from AI to target is half of this value
0x138 float 00 00 61 44 900.000000 maximum shooting distance; if target is further than this, the AI ceases fire and moves towards the target until it is below this distance
0x13C int16 05 00 5 UNUSED; maximum startle misses; the maximum number of shots to which extra inaccuracy can be added when an AI begins firing at the player (always 5, but Oni does not use this field)
0x13E int16 01 00 1 skill index (links weapon to the ONCC shooting skill table); here are the values used by Oni's ONWCs:
0x01 00 - w0_sec (not in game)
0x02 00 - w1_tap
0x04 00 - w2_sap
0x08 00 - w3_phr
0x10 00 - w4_psm
0x20 00 - w5_sbg
0x40 00 - w6_vdg
0x80 00 - w7_scc
0x00 01 - w8_mbo
0x00 02 - w9_scr
0x00 04 - w10_sni (not in game)
0x00 08 - w11_ba1
0x00 10 - w12_ba2
0x140 int32 00 00 00 00 0 fight timer, 240 for w4_psm, 200 for v6_vdg
0x144 float 00 00 00 00 0.000000 ballistic projectile speed for AI prediction purposes; if this field is unused, the projectile is assumed to be infinite speed; field is always zero except 150 for Superball Gun and 160 for Wave Motion Cannon's secondary trigger
0x148 float 00 00 00 00 0.000000 ballistic projectile gravity for AI prediction purposes; always zero except 0.5 for SBG and 0.3 for WMC's secondary trigger
0x14C float 00 00 34 43 180.000000 length of a firing spread; AI will perform gunfire dodging when it finds itself inside of a firing spread (see AI § Basic combat behaviors); can be visualized with *ai2_showfiringspreads=1* (180 for w1_tap, 150 for w2_sap, 120 for w4_psm)
0x150 float 00 00 40 40 3.000000 width of the firing spread's base; can be seen by ai2_showfiringspreads=1
0x154 float 50 77 D6 3D 0.104719 firing spread's skew; can be seen by ai2_showfiringspreads=1 (0.1 for w1_tap, 0.21 for w2_sap)


Transform matrix
Probably defines the orientation, scaling and position of the firing spread. It doesn't appear to be used.

0x158 to 0x1D7 - Secondary firing mode

The only vanilla weapon for which these fields are not all zero is w11_ba1. They are the exact counterparts of the fields at 0xD8 - 0x157.

0x1D8 to 0x6D7 - Weapon particle array

Every ONWC has 16 particle slots (80 at 0x50 bytes each). The number of slots actually used by the weapon is specified at 0xCA. Offsets are relative to the beginning of a slot.


Offset Type Raw Hex Value Description
First of 16 elements (black outline).
0x000 float AE 6C 56 3D 0.052349 transformation matrix, xx term
0x004 float 23 A6 7F 3F 0.998629 transformation matrix, xy term
0x008 float C2 53 90 B3 -0.000000... transformation matrix, xz term
0x00C float 23 A6 7F 3F 0.998629 transformation matrix, yx term
0x010 float AE 6C 56 BD -0.052349 transformation matrix, yy term
0x014 float AF 8D A9 B7 -0.000020 transformation matrix, yz term
0x018 float BA 59 A9 B7 -0.000020 transformation matrix, zx term
0x01C float 5B 02 85 35 0.000001 transformation matrix, zy term
0x020 float 00 00 80 BF -1.000000 transformation matrix, zz term
0x024 float 6F 63 57 40 3.365444 x-offset of particle to weapon
0x028 float B3 1D 89 BC -0.016738 y-offset of particle to weapon
0x02C float C5 C1 2A 3F 0.667019 z-offset of particle to weapon
0x030 char[16] w1_tap_e01 particle name (reference to 06226-3RAPw1_tap_e01.BINA)
0x040 int32 00 00 00 00 0 runtime only (pointer to particle class)
0x044 int16 01 00 1 ammo decrement (different for the 2 firing modes of w11_ba1)
0x046 int16 0C 00 12 delay between shots in frames (12 frames = 0.2 seconds)
0x048 int16 04 00 4 'roughjustice' delay between shots in frames
0x04A int16 00 00 0 number in frames for active firing mode (1st frame for activate); Used for w4_psm and w11_ba1
0x04C int16 00 00 0 0 = particle is triggered by fire1; 1 = particle is triggered by fire2; -1 = particle is triggered by both firing modes
0x04E int16 00 00 0 delay before firing


Transformation matrix
That's what defines orientation, stretching, etc. See CRSA for details.

0x6D8 to 0x71F - End of file

Onwc e.gif


Offset Type Raw Hex Value Description
0x6D8 char[32] weapon _empty empty weapon sound (reference to 08993-weapon_empty.imp.OSBD)
0x6F8 int32 00 00 00 00 0 runtime only (pointer to empty weapon sound)
0x6FC link 01 81 0E 00 3713 link to 03713-w1_glow.TXMP
0x700 link 01 82 0E 00 3714 link to 03714-w1_glow_ammo.TXMP
0x704 float 00 00 80 3F 1.000000 x-scale factor of glow textures
0x708 float 00 00 80 3F 1.000000 z-scale factor of glow textures
0x70C float 76 65 EB 3F 1.839034 x-offset of pickup handle
0x710 float 96 4C A9 3D 0.082666 y-offset of pickup handle
0x714 float 06 E2 14 3E 0.145393 z-offset of pickup handle
0x718 float 00 00 00 00 0.000000 hovering height of dropped weapon
0x71C char[4] AD DE dead unused


Glow textures
They're applied to the lower face of the M3GM's bounding box. The factors above are the ratio between the x/z extent of that face and the half-length/width of the glow textures. So if both factors are 0.5, the glow textures fit the bounding box exactly.
Pickup handle
The tolerance is hardcoded. The offsets are not relative to the weapon's axes, but to the world axes (!). This is a rather nasty "feature" because the offsets should be relative to the weapon's orientation. The way it is now, the pickup volume of a weapon is not necessarily next to the handle. That's why the WMC is so hard to pick up that some players conclude it's not possible; being the largest weapon, it has the largest potential discrepancy between its visual handle location and its pickup volume.


ONI BINARY DATA
ONVL << Other file types >> OPge
ONWC : Oni Weapon Class
Character file