OBD:ONWC: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (saving...)
m (finished)
Line 2: Line 2:




All ONWC files are 0 byte files. That means that Oni takes 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.
All ONWC files are 0 byte files. That means that Oni takes 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.
 
 
Unless specified otherwise, the coordinates are relative to the weapon's mesh (x = forwards, y = left, z = up).




Line 41: Line 44:
{{OBDtr| 0x050 | float    |C800C8| 00 00 20 41 | 10.000000      | spacing of tunnel textures }}
{{OBDtr| 0x050 | float    |C800C8| 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




Line 126: Line 136:
{{OBDtr| 0x0D7 | bitset  |FFDDDD| 00          | 0              | unused bitstet? }}
{{OBDtr| 0x0D7 | bitset  |FFDDDD| 00          | 0              | unused bitstet? }}
|}
|}
'''stun switcher''' -if enemy is inside shooting distance (between min and max) and is '''knockdown'''ed/'''stun'''ed or '''blownup'''ed, 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 '''knockdown'''ed or '''blownup'''ed, AI with this weapon switches to melee for a time specified in a *fight timer* field
'''I don't know how to call this''' - If you press and HOLD the fire (mouse1), it ONCE triggers particles for shooting, then drains ammo as if it was '''sustained fire''', but particles are NOT emitted (you just stand and watch as ammo drops). Used by w4_psm, probably because w4 particles works constantly (beam) after triggered.
'''I d.k.h.t.c.t.2''' - try this: set '''I don't know how to call this''' on some weapon, then set this on that weapon too. You will see that once you press the shooting button, it keeps *shooting* (altough you can't see any particles coming) even after you release shooting button. You can't stop it. It keeps shooting until all ammo is drained. So, basically, it works like an automatic hold of the mouse button.
P.S.: Someone please think off nice names for those two poor flags :))
--[[User:Loser|Loser]] 07:52, 29 July 2007 (CEST)




==0x0D8 to 0x1D7 - Firing modes==
==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===
===0x0D8 to 0x157 - Primary firing mode===
{{Table}}
{{Table}}
Line 166: Line 195:
{{OBDtr| 0x154 | float    |FF00C8| 50 77 D6 3D | 0.104719      | angle between firingspread's base and its altitude(length); can be seen by ai2_showfiringspreads<nowiki>=</nowiki>1 (0.1 for w1_tap, 0.21 for w2_sap) }}
{{OBDtr| 0x154 | float    |FF00C8| 50 77 D6 3D | 0.104719      | angle between firingspread's base and its altitude(length); can be seen by ai2_showfiringspreads<nowiki>=</nowiki>1 (0.1 for w1_tap, 0.21 for w2_sap) }}
|}
|}
;Transform matrix
:Probably defines the orientation, scaling and position of the firing spread. Didn't check.




===0x158 to 0x1D7 - Secondary firing mode===
===0x158 to 0x1D7 - Secondary firing mode===
The only original 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==
==0x1D8 to 0x6D7 - Weapon particle array==
Every ONWC has 16 particle slots (80 = 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.
{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtrBK|1=First of 16 elements (black outline). The amount of used elements is stored at 0x0CA.}}
{{OBDtrBK|1=First of 16 elements (black outline).}}
{{OBDtr| 0x000 | float    |F0F096| AE 6C 56 3D | 0.052349      | transformation matrix, xx term }}
{{OBDtr| 0x000 | float    |F0F096| AE 6C 56 3D | 0.052349      | transformation matrix, xx term }}
{{OBDtr| 0x004 | float    |F0F096| 23 A6 7F 3F | 0.998629      | transformation matrix, xy term }}
{{OBDtr| 0x004 | float    |F0F096| 23 A6 7F 3F | 0.998629      | transformation matrix, xy term }}
Line 185: Line 234:
{{OBDtr| 0x028 | float    |F0F096| B3 1D 89 BC | -0.016738      | y-offset of particle to weapon }}
{{OBDtr| 0x028 | float    |F0F096| B3 1D 89 BC | -0.016738      | y-offset of particle to weapon }}
{{OBDtr| 0x02C | float    |F0F096| C5 C1 2A 3F | 0.667019      | z-offset of particle to weapon }}
{{OBDtr| 0x02C | float    |F0F096| C5 C1 2A 3F | 0.667019      | z-offset of particle to weapon }}
{{OBDtr2|0x030 | char[16] |00C864| w1_tap_e01                  | particle name (reference to 06226-3RAPw1_tap_e01.[[OBD:BINA/PAR3|BINA]] of level 0) }}
{{OBDtr2|0x030 | char[16] |00C864| w1_tap_e01                  | particle name (reference to 06226-3RAPw1_tap_e01.[[OBD:BINA/PAR3|BINA]]) }}
{{OBDtr| 0x040 | int16    |00C8FF| 00 00      | 0              | unknown; always zero }}
{{OBDtr| 0x040 | int16    |00C8FF| 00 00      | 0              | unknown; always zero }}
{{OBDtr| 0x042 | int16    |00C8FF| 00 00      | 0              | unknown; always zero }}
{{OBDtr| 0x042 | int16    |00C8FF| 00 00      | 0              | unknown; always zero }}
Line 197: Line 246:




==0x6D8 to 0x71F - End of file==
;Transformation matrix
{{Table}}
:That's what defines orientation, stretching, etc.
{{OBDth}}
:See [[OBD:CRSA|CRSA]] for details.
{{OBDtr| 0x040 | int16    |00C8FF| 00 00      | 0              |  }}
{{OBDtr| 0x040 | int16    |00C8FF| 00 00      | 0              |  }}
{{OBDtr| 0x040 | int16    |00C8FF| 00 00      | 0              |  }}
{{OBDtr| 0x040 | int16    |00C8FF| 00 00      | 0              | }}




{{OBDtr| 0x000 | float    |F0F096|  |  |  }}
==0x6D8 to 0x71F - End of file==
{{OBDtr| 0x000 | float    |F0F096|  |  |  }}
{{OBDtr| 0x000 | float    |F0F096|  |  |  }}
{{OBDtr| 0x000 | float    |F0F096|  |  |  }}


{{OBDtr| 0x004 | float    |EBEBEB|  |  |  }}
{{OBDtr| 0x0DC | float    |EBEBEB|  |  |  }}


[[image:onwc_e.gif]]




 
{{Table}}
{{OBDtr2| 0x04 | char[64] |C8FFC8| Easy              | entry name }}
{{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             | unknown; always zero }}
 
{{OBDtr| 0x6FC | link    |C8C864| 01 81 0E 00 | 3713          | link to 03713-w1_glow.[[OBD:TXMP|TXMP]] }}
{{OBD_File_Footer | type=ONWC | prev=ONVL | next=OPge | name=Oni Weapon Class | family=Level}}
{{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 }}
{|align=right
{{OBDtr| 0x710 | float    |0096C8| 96 4C A9 3D | 0.082666      | y-offset of pickup handle }}
![[OBD:Oni Binary Data|ONI BINARY DATA]]
{{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 unheld weapon }}
![[OBD:ONVL|ONVL]] << [[OBD:File types|Other file types]] >> [[OBD:OPge|OPge]]
{{OBDtr| 0x71C | char[4|FF80C0| AD DE      | dead          | unused }}
|-
!<FONT SIZE=5>ONWC : Oni Weapon Class</FONT>
|-
![[OBD:File types/Global|Level 0 file]]
|-
![http://geyser.oni2.net/OUP/ONWC.txt Struct def for OUP]
|-
![http://www6.fh-eberswalde.de/user/dkriesch/onistuff/oni_onwc.htm Overview @ Oni Stuff]
|-
!TXT overviews (27 kB each) :<br>[http://www6.fh-eberswalde.de/user/dkriesch/onistuff/subfold/text/oni_onwc_dc.txt "," decimals] or [http://www6.fh-eberswalde.de/user/dkriesch/onistuff/subfold/text/oni_onwc_dp.txt "." decimals]
|}
There's an [[OBD:File types|empty]] ONWC file in every level, and the 12 actual ONWC files are in level 0.
;File size:1824 = 0x720 bytes
;Example: '''w1_tap.ONWC''' (unless specified otherwise)
;Structure
*0x08 - 0xD7 : MAIN WEAPON DATA (216 = 0xD8 bytes)
**0x08 - 0x53 : laser sight
**0x54 - 0x5F : ammo meter
**0x60 - 0xD7 : various weapon parameters
*0xD8 - 0x1D7 : FIRING MODE ARRAY (2 elements, 128 = 0x80 bytes each)
**0xD8 - 0x157 : primary firing mode
**0x158 - 0x1D7 : secondary firing mode
*0x1D8 - 0x6DC : WEAPON PARTICLE ARRAY (16 elements, 80 = 0x50 bytes each)
*0x6D8 - 0x71F : TRAILING CHUNK (68 =0x48 bytes)
**weapon sounds, unheld weapon parameters, blank filler
;Coordinates
:Unless specified otherwise, they are relative to the weapon's mesh
:(x = forwards, y = left, z = up)
 
----
----
==0x00 - 0xD7==
;MAIN PART
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/onwc_a.gif
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
!Offset
!Hex
!Translation
!Meaning
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x00
| BGCOLOR="#FF0000" | 01 '''75 0E''' 00
| 3701
| ALIGN=LEFT | File ID (03701-w1_tap.ONWC)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x04
| BGCOLOR="#FFFF00" | 01 00 00 ''00''
| 0
| ALIGN=LEFT | level ID
|}
----
===0x08 - 0x53===
;LASER SIGHT PARAMETERS
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
!Offset
!Hex
!Translation
!Meaning
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x08
| BGCOLOR="#FFC8C8" | F5 A4 49 40
| 3.150693
| ALIGN=LEFT | x-offset of the origin
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x0C
| BGCOLOR="#FFC8C8" | F4 2C A5 3B
| 0.005041
| ALIGN=LEFT | y-offset of the origin
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x10
| BGCOLOR="#FFC8C8" | 21 4E D2 3E
| 0.410752
| ALIGN=LEFT | z-offset of the origin
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x14
| BGCOLOR="#FFC8C8" | 23 A6 7F 3F
| 0.998629
| ALIGN=LEFT | something like the stiffness (try setting it to 0.001 and lower)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x18
| BGCOLOR="#FFC8C8" | AA 6C 56 BD
| -0.052349
| ALIGN=LEFT | additional azimuth
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x1C
| BGCOLOR="#FFC8C8" | 69 66 AA B7
| -0.000020
| ALIGN=LEFT | additional elevation
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x20
| BGCOLOR="#FFC8C8" | 00 40 9C 45
| 5000.000000
| ALIGN=LEFT | maximal length of laser sight vector
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x24
| BGCOLOR="#FFFFC8" | 00 00 FF FF
| Red, opaque
| ALIGN=LEFT | laser sight color (RGBA)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x28
| BGCOLOR="#C8FFC8" | 01 '''94 05''' 00
| 1428
| ALIGN=LEFT | crosshair texture (link to 01428-target_1A.[[OBD:TXMP|TXMP]])
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x2C
| BGCOLOR="#C8FFC8" | FF FF FF 00
| White, transparent
| ALIGN=LEFT | crosshair background color (RGBA)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x30
| BGCOLOR="#C8FFC8" | CD CC 4C 3F
| 0.800000
| ALIGN=LEFT | crosshair scale factor
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x34
| BGCOLOR="#C8FFFF" | 01 '''95 05''' 00
| 1429
| ALIGN=LEFT | locked crosshair texture (link to 01429-target_1B.[[OBD:TXMP|TXMP]])
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x38
| BGCOLOR="#C8FFFF" | FF FF FF 00
| White, transparent
| ALIGN=LEFT | locked crosshair background color (RGBA)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x3C
| BGCOLOR="#C8FFFF" | CD CC 4C 3F
| 0.800000
| ALIGN=LEFT | locked crosshair scale factor
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x40
| BGCOLOR="#FFC8FF" | 00 '''00 00''' 00
| not used
| ALIGN=LEFT | tunnel texture ([[OBD:TXMP|TXMP]] link)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x44
| BGCOLOR="#FFC8FF" | FF FF FF 00
| White, transparent
| ALIGN=LEFT | tunnel background color (RGBA)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x48
| BGCOLOR="#FFC8FF" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | tunnel scale factor
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x4C
| BGCOLOR="#FFC800" | 0F 00 00 00
| 15
| ALIGN=LEFT | number of tunnel textures
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x50
| BGCOLOR="#C800C8" | 00 00 20 41
| 10.000000
| ALIGN=LEFT | 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
----
===0x54 - 0x5F===
;AMMO METER
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
!Offset
!Hex
!Translation
!Meaning
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x54
| BGCOLOR="#C87C64" | 01 '''7E 0E''' 00
| 3710
| ALIGN=LEFT | link to 03710-tap_icon.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x58
| BGCOLOR="#C87C64" | 01 '''7F 0E''' 00
| 3711
| ALIGN=LEFT | link to 03711-tap_empty.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x5C
| BGCOLOR="#C87C64" | 01 '''80 0E''' 00
| 3712
| ALIGN=LEFT | link to 03712-tap_fill.[[OBD:TXMP|TXMP]]
|}
----
===0x60 - 0xD7===
;WEAPON PARAMETERS
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
!Offset
!Hex
!Translation
!Meaning
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x60
| BGCOLOR="#C87C64" | 01 '''76 0E''' 00
| 3702
| ALIGN=LEFT | link to 03702-.[[OBD:M3GM|M3GM]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x64
| BGCOLOR="#B0C3D4" COLSPAN=2 | <TT>w1_tap</TT>
| ALIGN=LEFT | name of the weapon
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x84
| BGCOLOR="#E7CEA5" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | weapon mouse sensitivity (applies on AI, too)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x88
| BGCOLOR="#E7CEA5" | A6 92 2B 3D
| 0.041888
| ALIGN=LEFT | recoil (e.g. for '''w1_tap''' and '''w2_sap''')
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x8C
| BGCOLOR="#E7CEA5" | 92 0A 86 3E
| 0.261799
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x90
| BGCOLOR="#E7CEA5" | 00 00 A0 40
| 5.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x94
| BGCOLOR="#E7CEA5" | E2 A3 7B 3B
| 0.003839
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x98
| BGCOLOR="#E7CEA5" | 88 C3 E4 3A
| 0.001745
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x9C
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xA0
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xA4
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xA8
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xAC
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xB0
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xB4
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xB8
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xBC
| BGCOLOR="#E7CEA5" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xC0
| BGCOLOR="#FFDDDD" | 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xC2
| BGCOLOR="#FFDDDD" | 95 00
| 149
| ALIGN=LEFT | recoil animation type, (149 => autopistol_recoil)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xC4
| BGCOLOR="#FFDDDD" | A4 00
| 164
| ALIGN=LEFT | reload animation type, (164 => reload_pistol)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xC6
| BGCOLOR="#FFDDDD" | 19 00
| 25
| ALIGN=LEFT | pause after reload in 1/60 seconds
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xC8
| BGCOLOR="#FFDDDD" | 0A 00
| 10
| ALIGN=LEFT | amount of shots
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xCA
| BGCOLOR="#FFDDDD" | 06 00
| 6
| ALIGN=LEFT | amount of particles
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xCC
| BGCOLOR="#FFDDDD" | 01 00
| 1
| ALIGN=LEFT | amount of firing modes
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xCE
| BGCOLOR="#FFDDDD" | 0A 00
| 10
| ALIGN=LEFT | pause before reload in 1/60 seconds
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xD0
| BGCOLOR="#FFDDDD" | 04 00
| 4
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xD2
| BGCOLOR="#FFDDDD" | 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xD4
| BGCOLOR="#FFDDDD" | 30
| 48
| ALIGN=LEFT | Flags 1 :
 
{| BORDER=0 CELLPADDING=0 CELLSPACING=0
|- VALIGN=TOP
| ALIGN=RIGHT | 1 -&nbsp;
| unknown, never used
|- VALIGN=TOP
| ALIGN=RIGHT | 2 -&nbsp;
| '''weapon can't be holstered'''
|- VALIGN=TOP
| ALIGN=RIGHT | 4 -&nbsp;
| '''weapon reloads with energy cells'''
|- VALIGN=TOP
| ALIGN=RIGHT | 8 -&nbsp;
| '''weapon is a rifle (two-handed)'''
|- 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;
| '''stun switcher''',see below, used for w6_vdg
|}
|}


|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xD5
| BGCOLOR="#FFDDDD" | C0
| 192
| ALIGN=LEFT | Flags 2 :


{| BORDER=0 CELLPADDING=0 CELLSPACING=0
|- VALIGN=TOP
| ALIGN=RIGHT | 1 -&nbsp;
| '''knockdown switcher''',see below, used for w4_psm
|- VALIGN=TOP
| ALIGN=RIGHT | 2 -&nbsp;
| unknown, used for w5_sbg and w11_ba1
|- VALIGN=TOP
| ALIGN=RIGHT | 4 -&nbsp;
| '''secondary fire enabled'''
|- VALIGN=TOP
| ALIGN=RIGHT | 8 -&nbsp;
| '''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;
| '''I d.k.h.t.c.t.2''',see below, used for w1_tap, w2_sap and w3_phr
|- VALIGN=TOP
| ALIGN=RIGHT | 128 -&nbsp;
| '''laser sight visible'''
|}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xD6
| BGCOLOR="#FFDDDD" | 02 00
| 2
| ALIGN=LEFT | Flags 3 :
{| BORDER=0 CELLPADDING=0 CELLSPACING=0
|- VALIGN=TOP
| ALIGN=RIGHT | 1 -&nbsp;
| unknown, never used
|- VALIGN=TOP
| ALIGN=RIGHT | 2 -&nbsp;
| '''crosshair scaling''', used for w1_tap, w2_sap, w3_phr and w8_mbo
|- VALIGN=TOP
| ALIGN=RIGHT | 4 -&nbsp;
| unknown, never used
|- VALIGN=TOP
| ALIGN=RIGHT | 8 -&nbsp;
| '''weapon doesn't fade'''
|- VALIGN=TOP
| ALIGN=RIGHT | 16 -&nbsp;
| '''I don't know how to call this''', see below, used for w4_psm
|- VALIGN=TOP
| ALIGN=RIGHT | 32 -&nbsp;
| unknown, never used
|- VALIGN=TOP
| ALIGN=RIGHT | 64 -&nbsp;
| unknown, never used
|- VALIGN=TOP
| ALIGN=RIGHT | 128 -&nbsp;
| unknown, never used
|}
|}
'''stun switcher''' -if enemy is inside shooting distance (between min and max) and is '''knockdown'''ed/'''stun'''ed or '''blownup'''ed, 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 '''knockdown'''ed or '''blownup'''ed, AI with this weapon switches to melee for a time specified in a *fight timer* field
'''I don't know how to call this''' - If you press and HOLD the fire (mouse1), it ONCE triggers particles for shooting, then drains ammo as if it was '''sustained fire''', but particles are NOT emitted (you just stand and watch as ammo drops). Used by w4_psm, probably because w4 particles works constantly (beam) after triggered.
'''I d.k.h.t.c.t.2''' - try this: set '''I don't know how to call this''' on some weapon, then set this on that weapon too. You will see that once you press the shooting button, it keeps *shooting* (altough you can't see any particles coming) even after you release shooting button. You can't stop it. It keeps shooting until all ammo is drained. So, basically, it works like an automatic hold of the mouse button.
P.S.: Someone please think off nice names for those two poor flags :))
--[[User:Loser|Loser]] 07:52, 29 July 2007 (CEST)
----
----
==0xD8 - 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.
===0xD8 - 0x157===
;PRIMARY FIRING MODE
Offsets are given with respect to the start of the file.
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
!Offset
!Raw hex
!Value
!Meaning
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xD8
| BGCOLOR="#FFDDDD" | 00 00
| 0
| ALIGN=LEFT | unknown (1 for w9_scr)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xDA
| BGCOLOR="#FFDDDD" | 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xDC
| BGCOLOR="#64AAAA" | 23&nbsp;A6&nbsp;7F&nbsp;3F
| 0.998629
| ALIGN=LEFT | transform matrix XX
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xE0
| BGCOLOR="#64AAAA" | 05 6D 56 3D
| 0.052350
| ALIGN=LEFT | transform matrix XY
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xE4
| BGCOLOR="#64AAAA" | F4 8D A9 37
| 0.000020
| ALIGN=LEFT | transform matrix XZ
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xE8
| BGCOLOR="#64AAAA" | 05 6D 56 BD
| -0.052350
| ALIGN=LEFT | transform matrix YX
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xEC
| BGCOLOR="#64AAAA" | 23 A6 7F 3F
| 0.998629
| ALIGN=LEFT | transform matrix YY
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xF0
| BGCOLOR="#64AAAA" | D0 1D 0E B5
| -0.000001
| ALIGN=LEFT | transform matrix YZ
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xF4
| BGCOLOR="#64AAAA" | F4 8D A9 B7
| -0.000020
| ALIGN=LEFT | transform matrix ZX
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xF8
| BGCOLOR="#64AAAA" | D0 1D 0E B5
| -0.000001
| ALIGN=LEFT | transform matrix ZY
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0xFC
| BGCOLOR="#64AAAA" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | transform matrix ZZ
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x100
| BGCOLOR="#64AAAA" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | translation X; always zero for original weapons
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x104
| BGCOLOR="#64AAAA" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | translation Y; always zero for original weapons
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x108
| BGCOLOR="#64AAAA" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | translation Z; always zero for original weapons
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x10C
| BGCOLOR="#64AAAA" | 23 A6 7F 3F
| 0.998629
| ALIGN=LEFT | unknown; something with angle proportions between firingspread base's angles, the higher you set it the more it is taller than wider; can be seen with ai2_showfiringspreads=1
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x110
| BGCOLOR="#64AAAA" | AE 6C 56 BD
| -0.052349
| ALIGN=LEFT | unknown; something with firingspread's aim in the "x,z plane". This value is forcing firingspread to aim more left or more right than weapon is aiming or to even aim firingspread backwards; can be seen with ai2_showfiringspreads=1
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x114
| BGCOLOR="#64AAAA" | AF 8D A9 B7
| -0.000020
| ALIGN=LEFT | unknown; something with firingspread's aim in the "y plane". This value is forcing firingspread to aim more up or more down than weapon is aiming or to even aim firingspread backwards; can be seen with ai2_showfiringspreads=1
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x118
| BGCOLOR="#64AAAA" | DC FE 08 3C
| 0.008362
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x11C
| BGCOLOR="#64AAAA" | 5C 11 23 3E
| 0.159246
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x120
| BGCOLOR="#64AAAA" | 39 C6 2A 3F
| 0.667087
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x124
| BGCOLOR="#64AAAA" | 00 00 61 44
| 900.000000
| ALIGN=LEFT | unknown; it is some angle. If this angle is for example 90°, then AI, which is shooting this weapon, will try to copy target's movements eg. when target strafes left, armed AI stops shooting and runs left too. If you set it 270°, armed AI is performing opposite actions eg. when you run left, armed AI runs right. While running, AI stops shooting.
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x128
| BGCOLOR="#64AAAA" | 00 00 20 41
| 10.000000
| ALIGN=LEFT | Max inaccurancy 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.
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x12C
| BGCOLOR="#64AAAA" | 00 00 20 40
| 2.500000
| ALIGN=LEFT | unknown; always the same
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x130
| BGCOLOR="#64AAAA" | 00 00 96 43
| 300.000000
| ALIGN=LEFT | Weapon sound sphere radius. When somebody shoots, weapon creates this range. AIs which are inside this range notice there was a shot + they know WHO is the shooter and WHERE he stands (threat strong), can be seen with ai2_showsounds=1 (but you have to be in a large open area, since those ranges are quite big)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x134
| BGCOLOR="#64AAAA" | 00 00 40 41
| 12.000000
| ALIGN=LEFT | Minimal shooting distance; When AI is closer then min.shot.dist., it will stop shooting and attempt to go  away from the target until it again reaches higher distance then min.shot.dist. is. You can see its effect when AI is operating SBG and you get too close.
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x138
| BGCOLOR="#64AAAA" | 00 00 61 44
| 900.000000
| ALIGN=LEFT | Maximal shooting distance; When AI is further then max.shot.dist., it isn't shooting but running towards target until it reaches max.shot.dist. limit. Then AI opens fire. You can see its effect when AI is far away and has w2_sap.
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x13C
| BGCOLOR="#EBEBEB" | 05 00
| 5
| ALIGN=LEFT | unknown; always the same
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x13E
| BGCOLOR="#EBEBEB" | 01 00
| 1
| ALIGN=LEFT | weapon ID (used by [[OBD:ONCC#Shooting_skills_(0x15C_-_0x29)|AI shooting skills]])
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x140
| BGCOLOR="#EBEBEB" | 00 00 00 00
| 0
| ALIGN=LEFT | Fight timer, 240 for w4_psm, 200 for v6_vdg
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x144
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown, something with grenades (150 for SBG, 160 for WMC)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x148
| BGCOLOR="#8C8CCC" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | unknown, something with grenades (0.5 for SBG, 0.3 for WMC)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x14C
| BGCOLOR="#8C8CCC" | 00 00 34 43
| 180.000000
| ALIGN=LEFT | Length of firingspread which aims from weapon. When AI collides with this firingspread, it tries to dodge/hide of it. Can be seen by ai2_showfiringspreads=1  (180 for w1_tap, 150 for w2_sap, 120 for w4_psm)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x150
| BGCOLOR="#8C8CCC" | 00 00 40 40
| 3.000000
| ALIGN=LEFT | Lenght of the firingspread's base side. Can be seen by ai2_showfiringspreads=1
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x154
| BGCOLOR="#8C8CCC" | 50 77 D6 3D
| 0.104719
| ALIGN=LEFT | angle between firingspread's base and its altitude(length). 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. Didn't check.
----
===0x158 - 0x1D7===
;SECONDARY FIRING MODE
The only original weapon for which these fields are not all zero is '''w11_ba1'''.
They are the exact counterparts of the fields at 0xD8 - 0x157.
----
----
==0x1D8 - 0x6D7==
;PARTICLES
Every ONWC has 16 particle slots (80 = 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.
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
!Offset
!Raw hex
!Value
!Meaning
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x00
| BGCOLOR="#FF00C8" | AE 6C 56 3D
| 0.052349
| ALIGN=LEFT | transformation matrix, xx term
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x04
| BGCOLOR="#FF00C8" | 23 A6 7F 3F
| 0.998629
| ALIGN=LEFT | transformation matrix, xy term
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x08
| BGCOLOR="#FF00C8" | C2 53 90 B3
| -6.720757e-8
| ALIGN=LEFT | transformation matrix, xz term
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x0C
| BGCOLOR="#FF00C8" | 23 A6 7F 3F
| 0.998629
| ALIGN=LEFT | transformation matrix, yx term
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x10
| BGCOLOR="#FF00C8" | AE 6C 56 BD
| -0.052349
| ALIGN=LEFT | transformation matrix, yy term
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x14
| BGCOLOR="#FF00C8" | AF 8D A9 B7
| -0.000020
| ALIGN=LEFT | transformation matrix, yz term
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x18
| BGCOLOR="#FF00C8" | BA 59 A9 B7
| -0.000020
| ALIGN=LEFT | transformation matrix, zx term
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x1C
| BGCOLOR="#FF00C8" | 5B 02 85 35
| 0.000001
| ALIGN=LEFT | transformation matrix, zy term
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x20
| BGCOLOR="#FF00C8" | 00 00 80 BF
| -1.000000
| ALIGN=LEFT | transformation matrix, zz term
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x24
| BGCOLOR="#FF00C8" | 6F 63 57 40
| 3.365444
| ALIGN=LEFT | x-offset of particle to weapon
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x28
| BGCOLOR="#FF00C8" | B3 1D 89 BC
| -0.016738
| ALIGN=LEFT | y-offset of particle to weapon
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x2C
| BGCOLOR="#FF00C8" | C5 C1 2A 3F
| 0.667019
| ALIGN=LEFT | z-offset of particle to weapon
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x30
| BGCOLOR="#F0F096" COLSPAN=2 | <TT>w1_tap_e01</TT>
| ALIGN=LEFT | weapon particle (06226-3RAPw1_tap_e01.BINA)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x40
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x42
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x44
| BGCOLOR="#00C864" | 01 00
| 1
| ALIGN=LEFT | ammo decrement (different for the 2 firing modes of '''w11_ba1''')
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x46
| BGCOLOR="#00C864" | 0C 00
| 12
| ALIGN=LEFT | delay between shots in frames (12 frames = 0.2 seconds)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x48
| BGCOLOR="#00C864" | 04 00
| 4
| ALIGN=LEFT | unknown (looks like another delay)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x4A
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | number in frames for active firing mode (1st frame for activate). Used for '''w4_psm''' and '''w11_ba1'''
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x4C
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | &nbsp;0 : particle is fired with '''fire1'''<br> &nbsp;1 : particle is fired with '''fire2'''<br>-1 : particle is triggered by other particles
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x4E
| BGCOLOR="#00C864" | 00 00
| 0
| ALIGN=LEFT | delay before firing
|}
;Transformation matrix
:That's what defines orientation, stretching, etc.
:See [[OBD:CRSA|CRSA]] for details.
----
----
==0x6D8 - 0x71F==
;ENDING
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/onwc_e.gif
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
!Offset
!Raw hex
!Value
!Meaning
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x6D8
| 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"
|0x6F8
| BGCOLOR="#C80040" | 00 00 00 00
| 0
| ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x6FC
| BGCOLOR="#FFCD96" | 01 '''81 0E''' 00
| 3713
| ALIGN=LEFT | link to 03713-w1_glow.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x700
| BGCOLOR="#FFCD96" | 01 '''82 0E''' 00
| 3714
| ALIGN=LEFT | link to 03714-w1_glow_ammo.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x704
| BGCOLOR="#C8C864" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | x-scale factor of glow textures
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x708
| BGCOLOR="#C8C864" | 00 00 80 3F
| 1.000000
| ALIGN=LEFT | z-scale factor of glow textures
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x70C
| BGCOLOR="#C8C864" | 76 65 EB 3F
| 1.839034
| ALIGN=LEFT | x-offset of pickup handle
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x710
| BGCOLOR="#C8C864" | 96 4C A9 3D
| 0.082666
| ALIGN=LEFT | y-offset of pickup handle
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x714
| BGCOLOR="#C8C864" | 06 E2 14 3E
| 0.145393
| ALIGN=LEFT | z-offset of pickup handle
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x718
| BGCOLOR="#C8C864" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | hovering height of unheld weapon
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|0x71C
| BGCOLOR="#0096C8" | AD DE
| dead
| ALIGN=LEFT | blank filler
|}
;Glow textures
;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.
: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.
Line 1,068: Line 281:




----
{{OBD_File_Footer | type=ONWC | prev=ONVL | next=OPge | name=Oni Weapon Class | family=Level}}
----
==Notes==
 
 
----
----
{|align=center
![[OBD:Oni Binary Data|ONI BINARY DATA]]
|-
![[OBD:ONVL|ONVL]] << [[OBD:File types|Other file types]] >> [[OBD:OPge|OPge]]
|-
!ONWC : Oni Weapon Class
|}

Revision as of 13:31, 11 September 2007

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


All ONWC files are 0 byte files. That means that Oni takes 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.


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 the origin
0x00C float F4 2C A5 3B 0.005041 y-offset of the origin
0x010 float 21 4E D2 3E 0.410752 z-offset of the origin
0x014 float 23 A6 7F 3F 0.998629 something like the stiffness (try setting it to 0.001 and lower)
0x018 float AA 6C 56 BD -0.052349 additional azimuth
0x01C float 69 66 AA B7 -0.000020 additional elevation
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 CD CC 4C 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 on AI, too)
0x088 float A6 92 2B 3D 0.041888 recoil (e.g. for w1_tap and w2_sap)
0x08C float 92 0A 86 3E 0.261799 unknown
0x090 float 00 00 A0 40 5.000000 unknown
0x094 float E2 A3 7B 3B 0.003839 unknown
0x098 float 88 C3 E4 3A 0.001745 unknown
0x09C float 00 00 00 00 0.000000 unknown
0x0A0 float 00 00 00 00 0.000000 unknown
0x0A4 float 00 00 00 00 0.000000 unknown
0x0A8 float 00 00 00 00 0.000000 unknown
0x0AC float 00 00 00 00 0.000000 unknown
0x0B0 float 00 00 00 00 0.000000 unknown
0x0B4 float 00 00 00 00 0.000000 unknown
0x0B8 float 00 00 00 00 0.000000 unknown
0x0BC float 00 00 00 00 0.000000 unknown
0x0C0 int16 00 00 0 unknown; 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 unknown
0x0D2 int16 00 00 0 unknown; always zero
0x0D4 bitset 30 48 weapon options 1; the following bits are possible (values in dec):


001 - unknown; never used
002 - weapon can't be holstered
004 - weapon reloads with energy cells
008 - weapon is a rifle (two-handed)
016 - unknown; used for w1_tap and w2_sap
032 - sustained fire
064 - you can't shoot ...
128 - stun switcher,see below, used for w6_vdg


0x0D5 bitset C0 192 weapon options 2; the following bits are possible (values in dec):


001 - knockdown switcher,see below, used for w4_psm
002 - unknown; used for w5_sbg and w11_ba1
004 - secondary fire enabled
008 - weapon can't be reloaded
016 - run, jump and creep disabled
032 - unknown; used for w11_ba1
064 - I d.k.h.t.c.t.2,see below, used for w1_tap, w2_sap and w3_phr
128 - laser sight visible


0x0D6 bitset 02 2 weapon options 3; the following bits are possible (values in dec):


001 - unknown; never used
002 - crosshair scaling, used for w1_tap, w2_sap, w3_phr and w8_mbo
004 - unknown; never used
008 - weapon doesn't fade
016 - I don't know how to call this, see below, used for w4_psm
032 - unknown; never used
064 - unknown; never used
128 - unknown; never used


0x0D7 bitset 00 0 unused bitstet?


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

I don't know how to call this - If you press and HOLD the fire (mouse1), it ONCE triggers particles for shooting, then drains ammo as if it was sustained fire, but particles are NOT emitted (you just stand and watch as ammo drops). Used by w4_psm, probably because w4 particles works constantly (beam) after triggered.

I d.k.h.t.c.t.2 - try this: set I don't know how to call this on some weapon, then set this on that weapon too. You will see that once you press the shooting button, it keeps *shooting* (altough you can't see any particles coming) even after you release shooting button. You can't stop it. It keeps shooting until all ammo is drained. So, basically, it works like an automatic hold of the mouse button.

P.S.: Someone please think off nice names for those two poor flags :)) --Loser 07:52, 29 July 2007 (CEST)


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 unknown (1 for w9_scr)
0x0DC float 23 A6 7F 3F 0.998629 transform matrix XX
0x0E0 float 05 6D 56 3D 0.052350 transform matrix XY
0x0E4 float F4 8D A9 37 0.000020 transform matrix XZ
0x0E8 float 05 6D 56 BD -0.052350 transform matrix YX
0x0EC float 23 A6 7F 3F 0.998629 transform matrix YY
0x0F0 float D0 1D 0E B5 -0.000001 transform matrix YZ
0x0F4 float F4 8D A9 B7 -0.000020 transform matrix ZX
0x0F8 float D0 1D 0E B5 -0.000001 transform matrix ZY
0x0FC float 00 00 80 3F 1.000000 transform matrix ZZ
0x100 float 00 00 00 00 0.000000 translation X; always zero for original weapons
0x104 float 00 00 00 00 0.000000 translation Y; always zero for original weapons
0x108 float 00 00 00 00 0.000000 translation Z; always zero for original weapons
0x10C float 23 A6 7F 3F 0.998629 nknown; something with angle proportions between firingspread base's angles, the higher you set it the more it is taller than wider; can be seen with *ai2_showfiringspreads=1*
0x110 float AE 6C 56 BD -0.052349 unknown; something with firingspread's aim in the "x,z plane". This value is forcing firingspread to aim more left or more right than weapon is aiming or to even aim firingspread backwards; can be seen with *ai2_showfiringspreads=1*
0x114 float AF 8D A9 B7 -0.000020 unknown; something with firingspread's aim in the "y plane". This value is forcing firingspread to aim more up or more down than weapon is aiming or to even aim firingspread backwards; can be seen with *ai2_showfiringspreads=1*
0x118 float DC FE 08 3C 0.008362 unknown
0x11C float 5C 11 23 3E 0.159246 unknown
0x120 float 39 C6 2A 3F 0.667087 unknown
0x124 float 00 00 61 44 900.000000 unknown; it is some angle; if this angle is for example 90°, then AI, which is shooting this weapon, will try to copy target's movements eg. when target strafes left, armed AI stops shooting and runs left too; if you set it 270°, armed AI is performing opposite actions eg. when you run left, armed AI runs right; while running, AI stops shooting
0x128 float 00 00 20 41 10.000000 max. inaccurancy 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 unknown; always the same
0x130 float 00 00 96 43 300.000000 weapon sound sphere radius; when somebody shoots, weapon creates this range; AIs which are inside this range notice there was a shot + they know WHO is the shooter and WHERE he stands (threat strong), can be seen with *ai2_showsounds=1* (but you have to be in a large open area, since those ranges are quite big)
0x134 float 00 00 40 41 12.000000 minimal shooting distance; when AI is closer then min.shot.dist., it will stop shooting and attempt to go away from the target until it again reaches higher distance then min.shot.dist. is; you can see its effect when AI is operating SBG and you get too close
0x138 float 00 00 61 44 900.000000 maximal shooting distance; when AI is further then max.shot.dist., it isn't shooting but running towards target until it reaches max.shot.dist. limit; then AI opens fire; you can see its effect when AI is far away and has w2_sap
0x13C int16 05 00 5 unknown; always the same
0x13E int16 01 00 1 weapon ID (used by AI shooting skills) (--> needs a link to ONCC file; orginal link was : OBD:ONCC#Shooting_skills_.280x15C_-_0x29.29; the anchors doesn't exist any longer)
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 unknown, something with grenades (150 for SBG, 160 for WMC)
0x148 float 00 00 00 00 0.000000 unknown, something with grenades (0.5 for SBG, 0.3 for WMC)
0x14C float 00 00 34 43 180.000000 length of firingspread which aims from weapon; when AI collides with this firingspread, it tries to dodge/hide of it; can be seen by *ai2_showfiringspreads=1* (180 for w1_tap, 150 for w2_sap, 120 for w4_psm)
0x150 float 00 00 40 40 3.000000 lenght of the firingspread's base side; can be seen by ai2_showfiringspreads=1
0x154 float 50 77 D6 3D 0.104719 angle between firingspread's base and its altitude(length); 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. Didn't check.


0x158 to 0x1D7 - Secondary firing mode

The only original 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 = 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 int16 00 00 0 unknown; always zero
0x042 int16 00 00 0 unknown; always zero
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 unknown (looks like another delay)
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 fired with fire1; 1 = particle is fired with fire2; -1 = particle is triggered by other particles
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 unknown; always zero
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 unheld 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" (actually, the offsets should be relative to the weapon's orientation)
The way it's now, the pickup volume of a WMC is not necessarily next to the handle. That's why it's hard to pick up.


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