OBD:ONWC
Jump to navigation
Jump to search
ONI BINARY DATA |
---|
ONVL << Other file types >> OPge |
ONWC : Oni Weapon Class |
Level 0 file |
Struct def for OUP |
Overview @ Oni Stuff |
TXT overviews (27 kB each) : "," decimals or "." decimals |
There's an 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
Offset | Hex | Translation | Meaning |
---|---|---|---|
0x00 | 01 75 0E 00 | 3701 | File ID (03701-w1_tap.ONWC) |
0x04 | 01 00 00 00 | 0 | level ID |
0x08 - 0x53
- LASER SIGHT PARAMETERS
Offset | Hex | Translation | Meaning |
---|---|---|---|
0x08 | F5 A4 49 40 | 3.150693 | x-offset of the origin |
0x0C | F4 2C A5 3B | 0.005041 | y-offset of the origin |
0x10 | 21 4E D2 3E | 0.410752 | z-offset of the origin |
0x14 | 23 A6 7F 3F | 0.998629 | something like the stiffness (try setting it to 0.001 and lower) |
0x18 | AA 6C 56 BD | -0.052349 | additional azimuth |
0x1C | 69 66 AA B7 | -0.000020 | additional elevation |
0x20 | 00 40 9C 45 | 5000.000000 | maximal length of laser sight vector |
0x24 | 00 00 FF FF | Red, opaque | laser sight color (RGBA) |
0x28 | 01 94 05 00 | 1428 | crosshair texture (link to 01428-target_1A.TXMP) |
0x2C | FF FF FF 00 | White, transparent | crosshair background color (RGBA) |
0x30 | CD CC 4C 3F | 0.800000 | crosshair scale factor |
0x34 | 01 95 05 00 | 1429 | locked crosshair texture (link to 01429-target_1B.TXMP) |
0x38 | FF FF FF 00 | White, transparent | locked crosshair background color (RGBA) |
0x3C | CD CC 4C 3F | 0.800000 | locked crosshair scale factor |
0x40 | 00 00 00 00 | not used | tunnel texture (TXMP link) |
0x44 | FF FF FF 00 | White, transparent | tunnel background color (RGBA) |
0x48 | 00 00 80 3F | 1.000000 | tunnel scale factor |
0x4C | 0F 00 00 00 | 15 | number of tunnel textures |
0x50 | 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
0x54 - 0x5F
- AMMO METER
Offset | Hex | Translation | Meaning |
---|---|---|---|
0x54 | 01 7E 0E 00 | 3710 | link to 03710-tap_icon.TXMP |
0x58 | 01 7F 0E 00 | 3711 | link to 03711-tap_empty.TXMP |
0x5C | 01 80 0E 00 | 3712 | link to 03712-tap_fill.TXMP |
0x60 - 0xD7
- WEAPON PARAMETERS
Offset | Hex | Translation | Meaning | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x60 | 01 76 0E 00 | 3702 | link to 03702-.M3GM | ||||||||||||||||
0x64 | w1_tap | name of the weapon | |||||||||||||||||
0x84 | 00 00 80 3F | 1.000000 | weapon mouse sensitivity (applies on AI, too) | ||||||||||||||||
0x88 | A6 92 2B 3D | 0.041888 | recoil (e.g. for w1_tap and w2_sap) | ||||||||||||||||
0x8C | 92 0A 86 3E | 0.261799 | unknown | ||||||||||||||||
0x90 | 00 00 A0 40 | 5.000000 | unknown | ||||||||||||||||
0x94 | E2 A3 7B 3B | 0.003839 | unknown | ||||||||||||||||
0x98 | 88 C3 E4 3A | 0.001745 | unknown | ||||||||||||||||
0x9C | 00 00 00 00 | 0.000000 | unknown | ||||||||||||||||
0xA0 | 00 00 00 00 | 0.000000 | unknown | ||||||||||||||||
0xA4 | 00 00 00 00 | 0.000000 | unknown | ||||||||||||||||
0xA8 | 00 00 00 00 | 0.000000 | unknown | ||||||||||||||||
0xAC | 00 00 00 00 | 0.000000 | unknown | ||||||||||||||||
0xB0 | 00 00 00 00 | 0.000000 | unknown | ||||||||||||||||
0xB4 | 00 00 00 00 | 0.000000 | unknown | ||||||||||||||||
0xB8 | 00 00 00 00 | 0.000000 | unknown | ||||||||||||||||
0xBC | 00 00 00 00 | 0.000000 | unknown | ||||||||||||||||
0xC0 | 00 00 | 0 | unknown; always zero | ||||||||||||||||
0xC2 | 95 00 | 149 | recoil animation type, (149 => autopistol_recoil) | ||||||||||||||||
0xC4 | A4 00 | 164 | reload animation type, (164 => reload_pistol) | ||||||||||||||||
0xC6 | 19 00 | 25 | pause after reload in 1/60 seconds | ||||||||||||||||
0xC8 | 0A 00 | 10 | amount of shots | ||||||||||||||||
0xCA | 06 00 | 6 | amount of particles | ||||||||||||||||
0xCC | 01 00 | 1 | amount of firing modes | ||||||||||||||||
0xCE | 0A 00 | 10 | pause before reload in 1/60 seconds | ||||||||||||||||
0xD0 | 04 00 | 4 | unknown | ||||||||||||||||
0xD2 | 00 00 | 0 | unknown; always zero | ||||||||||||||||
0xD4 | 30 | 48 | Flags 1 :
| ||||||||||||||||
0xD5 | C0 | 192 | Flags 2 :
| ||||||||||||||||
0xD6 | 02 00 | 2 | Flags 3 :
|
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.
Offset | Raw hex | Value | Meaning |
---|---|---|---|
0xD8 | 00 00 | 0 | unknown (1 for w9_scr) |
0xDA | 00 00 | 0 | unknown; always zero |
0xDC | 23 A6 7F 3F | 0.998629 | unknown |
0xE0 | 05 6D 56 3D | 0.052350 | unknown |
0xE4 | F4 8D A9 37 | 0.000020 | unknown |
0xE8 | 05 6D 56 BD | -0.052350 | unknown |
0xEC | 23 A6 7F 3F | 0.998629 | unknown |
0xF0 | D0 1D 0E B5 | -0.000001 | unknown |
0xF4 | F4 8D A9 B7 | -0.000020 | unknown |
0xF8 | D0 1D 0E B5 | -0.000001 | unknown |
0xFC | 00 00 80 3F | 1.000000 | unknown |
0x100 | 00 00 00 00 | 0.000000 | unknown; always zero |
0x104 | 00 00 00 00 | 0.000000 | unknown; always zero |
0x108 | 00 00 00 00 | 0.000000 | unknown; always zero |
0x10C | 23 A6 7F 3F | 0.998629 | unknown; something with angle proportions between *tunnel* base's angles, the higher you set it the more it is taller than wider; can be seen with ai2_showfiringspreads=1 |
0x110 | AE 6C 56 BD | -0.052349 | unknown; something with *tunnel*'s aim in the "x,z plane". This value is forcing *tunnel* to aim more left or more right than weapon is aiming or to even aim *tunnel* backwards; can be seen with ai2_showfiringspreads=1 |
0x114 | AF 8D A9 B7 | -0.000020 | unknown; something with *tunnel*'s aim in the "y plane". This value is forcing *tunnel* to aim more up or more down than weapon is aiming or to even aim *tunnel* backwards; can be seen with ai2_showfiringspreads=1 |
0x118 | DC FE 08 3C | 0.008362 | unknown |
0x11C | 5C 11 23 3E | 0.159246 | unknown |
0x120 | 39 C6 2A 3F | 0.667087 | unknown |
0x124 | 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, gun AI stops shooting and runs left too. If you set it 270°, gun AI is performing opposite actions eg. When you run left, gun AI runs right. While running, AI stops shooting. |
0x128 | 00 00 20 41 | 10.000000 | 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 tries to aim weapon again straight to the target, then resume shooting. |
0x12C | 00 00 20 40 | 2.500000 | unknown; always the same |
0x130 | 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, can be seen with ai2_showsounds=1 (but you have to be in a large open area, since those ranges are quite big) |
0x134 | 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 | 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 | 05 00 | 5 | unknown; always the same |
0x13E | 01 00 | 1 | weapon ID (used by AI shooting skills) |
0x140 | 00 00 00 00 | 0 | Fight timer, 240 for w4_psm, 200 for v6_vdg |
0x144 | 00 00 00 00 | 0.000000 | unknown, something with grenades (150 for SBG, 160 for WMC) |
0x148 | 00 00 00 00 | 0.000000 | unknown, something with grenades (0.5 for SBG, 0.3 for WMC) |
0x14C | 00 00 34 43 | 180.000000 | Length of *tunnel* which aims from weapon and surrounds projectile's path. When AI collides with this *tunnel*, it tries to dodge/hide. Can be seen by ai2_showfiringspreads=1 (180 for w1_tap, 150 for w2_sap, 120 for w4_psm) |
0x150 | 00 00 40 40 | 3.000000 | Lenght of the *tunnel*'s base side. Can be seen by ai2_showfiringspreads=1 |
0x154 | 50 77 D6 3D | 0.104719 | angle between *tunnel*'s base and its altitude(length). Can be seen by ai2_showfiringspreads=1 (0.1 for w1_tap, 0.21 for w2_sap) |
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 - 0x6DC
- 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.
Offset | Raw hex | Value | Meaning |
---|---|---|---|
0x00 | AE 6C 56 3D | 0.052349 | transformation matrix, xx term |
0x04 | 23 A6 7F 3F | 0.998629 | transformation matrix, xy term |
0x08 | C2 53 90 B3 | -6.720757e-8 | transformation matrix, xz term |
0x0C | 23 A6 7F 3F | 0.998629 | transformation matrix, yx term |
0x10 | AE 6C 56 BD | -0.052349 | transformation matrix, yy term |
0x14 | AF 8D A9 B7 | -0.000020 | transformation matrix, yz term |
0x18 | BA 59 A9 B7 | -0.000020 | transformation matrix, zx term |
0x1C | 5B 02 85 35 | 0.000001 | transformation matrix, zy term |
0x20 | 00 00 80 BF | -1.000000 | transformation matrix, zz term |
0x24 | 6F 63 57 40 | 3.365444 | x-offset of particle to weapon |
0x28 | B3 1D 89 BC | -0.016738 | y-offset of particle to weapon |
0x2C | C5 C1 2A 3F | 0.667019 | z-offset of particle to weapon |
0x30 | w1_tap_e01 | weapon particle (06226-3RAPw1_tap_e01.BINA) | |
0x40 | 00 00 | 0 | unknown; always zero |
0x42 | 00 00 | 0 | unknown; always zero |
0x44 | 01 00 | 1 | ammo decrement (different for the 2 firing modes of w11_ba1) |
0x46 | 0C 00 | 12 | delay between shots in frames (12 frames = 0.2 seconds) |
0x48 | 04 00 | 4 | unknown (looks like another delay) |
0x4A | 00 00 | 0 | unknown, used for w4_psm and w11_ba1 (looks like another delay) |
0x4C | 00 00 | 0 | 0 : particle is fired with fire1 1 : particle is fired with fire2 -1 : particle is triggered by other particles |
0x4E | 00 00 | 0 | delay before firing |
- Transformation matrix
- That's what defines orientation, stretching, etc.
- See CRSA for details.
0x6D8 - 0x71F
- ENDING
Offset | Raw hex | Value | Meaning |
---|---|---|---|
0x6D8 | weapon _empty | empty weapon sound (08992-weapon_empty.grp.OSBD) (08993-weapon_empty.imp.OSBD) | |
0x6F8 | 00 00 00 00 | 0 | unknown; always zero |
0x6FC | 01 81 0E 00 | 3713 | link to 03713-w1_glow.TXMP |
0x700 | 01 82 0E 00 | 3714 | link to 03714-w1_glow_ammo.TXMP |
0x704 | 00 00 80 3F | 1.000000 | x-scale factor of glow textures |
0x708 | 00 00 80 3F | 1.000000 | z-scale factor of glow textures |
0x70C | 76 65 EB 3F | 1.839034 | x-offset of pickup handle |
0x710 | 96 4C A9 3D | 0.082666 | y-offset of pickup handle |
0x714 | 06 E2 14 3E | 0.145393 | z-offset of pickup handle |
0x718 | 00 00 00 00 | 0.000000 | hovering height of unheld weapon |
0x71C | AD DE | dead | blank filler |
- 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.
Notes
ONI BINARY DATA |
---|
ONVL << Other file types >> OPge |
ONWC : Oni Weapon Class |