XML:ONWC: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
 
m (link fix)
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> ONWC File
{{XML_File_Header | type=ONWC | prev=ONVL | next=OPge | name=Oni Weapon Class }}


__TOC__


<CENTER>[[OBD:ONVL|<==]] <FONT SIZE=5>ONWC File</FONT> [[OBD:OPge|==>]]<BR>
'''general information'''
<FONT SIZE=2>Oni Weapon Class - Level File</FONT></CENTER>
* The xml code on this page is compatible with onisplit '''v0.9.61.0'''
* vanilla ONWC files are stored at/inside
** Edition/install/VanillaDats/level0_Final/level0_Final '''(AE v6)'''
** AE/AEInstaller/vanilla/level0_Final.dat '''(AE v7)'''




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.
'''file structure'''


ONWC
  |
  +-- M3GM (embedded 3D mesh)
        |
        +-- PNTA <Points>
        +-- VCRA <VertexNormals>
        +-- VCRA <FaceNormals>
        +-- TXCA <TextureCoordinates>
        +-- IDXA <TriangleStrips>
        +-- IDXA <FaceNormalIndices>
        +-- TXMP <Texture> (link to external file)


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


http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/onwc_e.gif
==ONWC: Oni Weapon Class==


{|class="wikitable" width=100%
|width=120px| '''XML tag'''
|width=60px| '''type'''
| '''description'''
|-
| <LaserSight>
|
| see [[#<LaserSight>|HERE]]
|-
| <AmmoMeter>
|
| see [[#<AmmoMeter>|HERE]]
|-
| <Geometry>
| link
| [[#M3GM|Weapon instance]] number (#N). For geometry import/exchange see [[#new_method|HERE]].
|-
| <Name>
| char[32]
| <font color="#777777">ONWC</font>file<font color="#777777">.oni</font> <font color="#777777">(don't use file prefix/suffix)</font>
|-
| <MouseSensitivity>
| float
| weapon mouse sensitivity (applies on AI, too)
|-
| <Recoil>
|
| see [[#<Recoil>|HERE]]
|-
| <RecoilAnimationType>
| link
| an recoil [[XML:StNA#animation_types|animation type]]
|-
| <ReloadAnimationType>
| link
| an reload [[XML:StNA#animation_types|animation type]]
|-
| <PauseAfterReload>
| int16
| pause after reload in 1/60 seconds
|-
|valign=top| <MaxShots>
|valign=top| int16
| amount of shots


{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
Let's say a weapon has 4 emitters each with <UsedAmmo>1 and the weapon shall be able to fire 3 times. Then <MaxShots> has to be 12 = 4 * 1 * 3.
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
| WIDTH=15% | <B>Hex</B>
| WIDTH=15% | <B>Translation</B>
| WIDTH=70% | <B>Meaning</B>
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF0000" | 01 75 0E 00
| 3701
| ALIGN=LEFT | 03701-w1_tap.ONWC
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFF00" | 01 00 00 00
| 0
| ALIGN=LEFT | level 0
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8C8" | F5 A4 49 40
| 3.150693
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8C8" | F4 2C A5 3B
| 0.005041
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| 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):


A mismatching <MaxShots> number creates an infinite ammunition bug.
|-
| <ParticleCount>
| int16
| amount of particles
|-
| <FiringModeCount>
| int16
| amount of used firing modes (max = 2 ?)
|-
| <PauseBeforeReload>
| int16
| pause before reload in 1/60 seconds
|-
| <ReleaseDelay>
| int16
| release delay; delay between the moment the trigger is released and the moment the weapon stops firing
|-
|valign=top| <Flags>
|valign=top| flag
| weapon options
: NoHolster
: UsesCells
: TwoHanded
: RecoilAffectsAiming
:: Without this flag there will be still recoil. In any case the recoil makes the aim go upwards.
:: If flag is set: the aiming will stay the same after firing the gun.
:: If flag isn't set: the upward movement stops earlier and when the fire ended the arm will fall to the previous aiming position. ([http://youtu.be/eq91flq6YkU w1_tap observation])
: Automatic
: StunSwitcher
:: if enemy is inside shooting distance (between min and max) and is knockdowned/stunned or blownupped, AI with this weapon switches to melee for a time specified in a *fight timer* field
: KnockdownSwitcher
:: 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
: Explosive
: SecondaryFire
: BarabbasWeapon
:: 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
: Heavy
: AutoRelease
: HasReleaseDelay
: HasLaserSight
: ScaleCrosshair
: NoFade
: DrainAmmo
|-
| <FiringModes>
|
| holds 2 <FiringModes> tags
|-
| <AIFiringMode>
|
| see [[#<AIFiringMode>|HERE]]
|-
| <Particles>
|
| holds 16 <ONWCParticle> tags
|-
| <ONWCParticle>
|
| see [[#<ONWCParticle>|HERE]]
|-
| <EmptyWeaponSound>
| link
| <font color="#777777">OSBD</font>file<font color="#777777">.imp.oni</font> <font color="#777777">(don't use file prefix/suffix)</font>
|-
| <Glow>
| link
| TXMPfile<font color="#777777">.oni (don't use file suffix)</font>
|-
| <GlowAmmo>
| link
| TXMPfile<font color="#777777">.oni (don't use file suffix)</font>
|-
| <GlowTextureScale>
| float
| x z scale factor of glow textures
|-
| <PickupHandleOffset>
| float
| x y z offset of pickup handle
|-
| <HoveringHeight>
| float
| hovering height of unheld weapon
|}


{| BORDER=0 CELLPADDING=0 CELLSPACING=0
; Glow textures
|- VALIGN=TOP
: 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.
| ALIGN=RIGHT | 1 -&nbsp;
; Pickup handle
| unknown, never used
: The tolerance is hardcoded. The offsets are not relative to the weapon's axes, but to the world axes (!).
|- VALIGN=TOP
: This is a rather nasty "feature" (actually, the offsets should be relative to the weapon's orientation)
| ALIGN=RIGHT | 2 -&nbsp;
: 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.
| weapon can't be holstered
 
|- VALIGN=TOP
 
| ALIGN=RIGHT | 4 -&nbsp;
===<LaserSight>===
| weapon reloads with energy cells
; Crosshair
|- VALIGN=TOP
: Default crosshair appears where the laser sight hits environment, corpses, etc
| ALIGN=RIGHT | 8 -&nbsp;
: Locked crosshair appears when the laser sight hits characters (including the shooter)
| weapon is a rifle (two-handed)
: "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 | 16 -&nbsp;
 
| unknown, used for w1_tap and w2_sap
{|class="wikitable" width=100%
|- VALIGN=TOP
|width=120px| '''XML tag'''
| ALIGN=RIGHT | 32 -&nbsp;
|width=60px| '''type'''
| sustained fire
| '''description'''
|- VALIGN=TOP
|-
| ALIGN=RIGHT | 64 -&nbsp;
| <Origin>
| you can't shoot ...
| float
|- VALIGN=TOP
| x y z
| ALIGN=RIGHT | 128 -&nbsp;
|-
| unknown, used for w6_vdg
| <Stiffness>
| float
| x-component of laser sight direction ?
|-
| <AdditionalAzimuth>
| float
| [[wikipedia:Azimuth]]
|-
| <AdditionalElevation>
| float
| [[wikipedia:Elevation]]
|-
| <LaserMaxLength>
| float
| maximal length of laser sight vector
|-
| <LaserColor>
| color
| laser sight color: B G R A
|-
| <NormalTexture>
| link
| crosshair texture: TXMPfile<font color="#777777">.oni (don't use file suffix)</font>
|-
| <NormalColor>
| color
| crosshair background color: B G R A
|-
| <NormalScale>
| float
| crosshair scale factor
|-
| <LockedTexture>
| link
| locked crosshair texture: TXMPfile<font color="#777777">.oni (don't use file suffix)</font>
|-
| <LockedColor>
| color
| locked crosshair background color: B G R A
|-
| <LockedScale>
| float
| locked crosshair scale factor
|-
| <TunnelTexture>
| link
| tunnel texture
|-
| <TunnelColor>
| color
| tunnel background color: R G B A
|-
| <TunnelScale>
| float
| tunnel scale factor
|-
| <TunnelCount>
| int32
| number of tunnel textures
|-
| <TunnelSpacing>
| float
| spacing of tunnel textures
|}
|}




|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
===<AmmoMeter>===
| BGCOLOR="#FFDDDD" | C0
{|class="wikitable" width=100%
| 192
|width=120px| '''XML tag'''
| ALIGN=LEFT | weapon options 2; the options are stored as bitsets, so the following options are possible (values in dec):
|width=60px| '''type'''
| '''description'''
|-
| <Icon>
| link
| TXMPfile<font color="#777777">.oni (don't use file suffix)</font>
|-
| <Empty>
| link
| TXMPfile<font color="#777777">.oni (don't use file suffix)</font>
|-
| <Fill>
| link
| TXMPfile<font color="#777777">.oni (don't use file suffix)</font>
|}




{| BORDER=0 CELLPADDING=0 CELLSPACING=0
===<Recoil>===
|- VALIGN=TOP
{|class="wikitable" width=100%
| ALIGN=RIGHT | 1 -&nbsp;
|width=120px| '''XML tag'''
| unknown, used for w4_psm
|width=60px| '''type'''
|- VALIGN=TOP
| '''description'''
| ALIGN=RIGHT | 2 -&nbsp;
|-
| unknown, used for w5_sbg and w11_ba1
| <Base>
|- VALIGN=TOP
| float
| ALIGN=RIGHT | 4 -&nbsp;
| recoil base (e.g. for w1_tap and w2_sap)
| secondary fire enabled
|-
|- VALIGN=TOP
| <Max>
| ALIGN=RIGHT | 8 -&nbsp;
| float
| weapon can't be reloaded
| recoil max
|- VALIGN=TOP
|-
| ALIGN=RIGHT | 16 -&nbsp;
| <Factor>
| run, jump and creep disabled
| float
|- VALIGN=TOP
| recoil factor
| ALIGN=RIGHT | 32 -&nbsp;
|-
| unknown, used for w11_ba1
| <ReturnSpeed>
|- VALIGN=TOP
| float
| ALIGN=RIGHT | 64 -&nbsp;
| recoil return speed
| unknown, used for w1_tap, w2_sap and w3_phr
|-
|- VALIGN=TOP
| <FiringReturnSpeed>
| ALIGN=RIGHT | 128 -&nbsp;
| float
| red line visible
| recoil firing return speed
|}
|}




|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
===<AIFiringMode>===
| BGCOLOR="#FFDDDD" | 02 00
w11_ba1 is the only original weapon that use also the second firing mode.
| 2
| ALIGN=LEFT | weapon options 3; the options are stored as bitsets, so the following options are possible (values in dec):


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


{| BORDER=0 CELLPADDING=0 CELLSPACING=0
{|class="wikitable" width=100%
|- VALIGN=TOP
|width=120px| '''XML tag'''
| ALIGN=RIGHT | 1 -&nbsp;
|width=60px| '''type'''
| unknown, never used
| '''description'''
|- VALIGN=TOP
|-
| ALIGN=RIGHT | 2 -&nbsp;
| <Flags>
| unknown, used for w1_tap, w2_sap, w3_phr and w8_mbo
| flag
|- VALIGN=TOP
| NoWildShots
| ALIGN=RIGHT | 4 -&nbsp;
|-
| unknown, never used
| <InverseDirection>
|- VALIGN=TOP
| matrix4x3
| ALIGN=RIGHT | 8 -&nbsp;
| targeting inverse transform matrix - the inverse of the matrix that gives the targeting direction
| unknown, used for w11_ba1
|-
|- VALIGN=TOP
| <Direction>
| ALIGN=RIGHT | 16 -&nbsp;
| vector3
| unknown, used for w4_psm
| targeting direction; sets orientation of firingspread
|- VALIGN=TOP
|-
| ALIGN=RIGHT | 32 -&nbsp;
| <Origin>
| unknown, never used
| vector3
|- VALIGN=TOP
| targeting origin; sets deviation of A.I.'s aim from target's origin (target's origin + this vector = direction where to aim and fire)
| ALIGN=RIGHT | 64 -&nbsp;
|-
| unknown, never used
| <PredictionSpeed>
|- VALIGN=TOP
| float
| ALIGN=RIGHT | 128 -&nbsp;
| prediction speed; numeric speed of the projectile A.I. prediction takes into account when calculating where to fire in order to hit moving target
| unknown, never used
|-
| <MaxInaccuracyAngle>
| float
| 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
|-
| <AimRadius>
| float
| aim_radius; always the same; possible related to the inaccuracy angle above
|-
| <AISoundRadius>
| float
| weapon sound sphere radius; defines radius of the A.I. sound sphere (gunfire type, see [[AI#Vision and hearing|HERE]] about A.I. sound spheres) which is created for a short moment when this weapon is fired
|-
| <MinShootingDistance>
| float
| minimal shooting distance; if target is closer than min.shoot.dist then A.I. ceases fire and moves away from the target till at least min.shoot.dis. is achieved; diameter, not a radius, so effective distance from A.I. to target is half of this value
|-
| <MaxShootingDistance>
| float
| maximal shooting distance; if target is further than max.shoot.dist then A.I. ceases fire and moves towards the target until at least max.shoot.dis. is achieved
|-
| <MaxStartleMisses>
| float
| maximum startle misses; probably the maximum number of shots an AI can miss when surprised before he starts aiming
|-
| <SkillIndex>
| int16
| [[XML:ONCC#.3CWeaponSkills.3E|ONCC skill index]]
|-
| <FightTimer>
| int32
| fight timer, 240 for w4_psm, 200 for v6_vdg
|-
| <ProjectileSpeed>
| float
| ballistic projectile speed (150 for SBG, 160 for WMC)
|-
| <ProjectileGravity>
| float
| ballistic projectile gravity, can be negative for firing at the enemy's feet (0.5 for SBG, 0.3 for WMC)
|-
| <FireSpreadLength>
| float
| length of a firingspread; A.I. can utilize gunfire dodge mechanics when it collides with some firingspread (read [[AI#Basic combat behaviors|HERE]]); can be seen by *ai2_showfiringspreads=1* (180 for w1_tap, 150 for w2_sap, 120 for w4_psm)
|-
| <FireSpreadWidth>
| float
| length of the firingspread's base; can be seen by ai2_showfiringspreads=1
|-
| <FireSpreadSkew>
| float
| firingspread's skew; can be seen by ai2_showfiringspreads=1 (0.1 for w1_tap, 0.21 for w2_sap)
|}
|}
;Fire spread
Note that the dodging fire spread set here is entirely separate from the weapon's <u>actual</u> fire spread, that is, the conical bullet fire that a weapon like the autopistol produces (see note at end of the [[OBD:BINA/PAR3#Emitters|PAR3 Emitters section]]). The dodging fire spread is separate in order to allow fine-tuning of the area from which the AI will attempt to escape, rather than simply relying on the calculated cone of weapons fire that is actually produced.




|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
===<ONWCParticle>===
| BGCOLOR="#FFDDDD" | 00 00
; Transformation matrix
| 0
: That's what defines orientation, stretching, etc.
| ALIGN=LEFT | unknown
: See [[OBD:CRSA|CRSA]] for details.
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
 
| BGCOLOR="#FFDDDD" | 00 00
{|class="wikitable" width=100%
| 0
|width=120px| '''XML tag'''
| ALIGN=LEFT | unknown; always zero
|width=60px| '''type'''
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| '''description'''
| BGCOLOR="#64AAAA" | 23 A6 7F 3F
|-
| 0.998629
| <Transform>
| ALIGN=LEFT | unknown
| matrix4x3
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| transformation matrix xx xy xz yx yy yz zx zy zz + x y z offset of particle to weapon
| BGCOLOR="#64AAAA" | 05 6D 56 3D
|-
| 0.052350
| <ParticleClass>
| ALIGN=LEFT | unknown
| link
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| <font color="#777777">BINA3RAP</font>file<font color="#777777">.oni</font> <font color="#777777">(don't use file prefix/suffix)
| BGCOLOR="#64AAAA" | F4 8D A9 37
|-
| 0.000020
| <UsedAmmo>
| ALIGN=LEFT | unknown
| int16
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| ammo decrement (different for the 2 firing modes of w11_ba1)
| BGCOLOR="#64AAAA" | 05 6D 56 BD
|-
| -0.052350
| <ShotDelay>
| ALIGN=LEFT | unknown
| int16
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| normal delay between shots in frames
| BGCOLOR="#64AAAA" | 23 A6 7F 3F
|-
| 0.998629
| <RoughJusticeShotDelay>
| ALIGN=LEFT | unknown
| int16
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| 'roughjustice' delay between shots in frames
| BGCOLOR="#64AAAA" | D0 1D 0E B5
|-
| -0.000001
| <ActiveFrames>
| ALIGN=LEFT | unknown
| int16
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| number in frames for active firing mode (1st frame for activate); Used for w4_psm and w11_ba1
| BGCOLOR="#64AAAA" | F4 8D A9 B7
|-
| -0.000020
|valign=top| <TriggeredBy>
| ALIGN=LEFT | unknown
|valign=top| int16
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|
| BGCOLOR="#64AAAA" | D0 1D 0E B5
: 0 (particle is triggered by fire1)
| -0.000001
: 1 (particle is triggered by fire2)
| ALIGN=LEFT | unknown
: -1 (particle is triggered by both firing modes)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
|-
| BGCOLOR="#64AAAA" | 00 00 80 3F
| <DelayBeforeFiring>
| 1.000000
| int16
| ALIGN=LEFT | unknown
| delay before firing
|- 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>
====particle adjustment====
When adding particles in <ONWCParticle> section then the last three values of <Transform> are the particle start location.
 
Inside the 3D editor any object can serve as a helpful reference: pick one point of it and move it to the location from where the particle should be spawned. Copy the value into the xml file. (Caution: Mod Tool uses a comma as decimal mark, onisplit's xml files use a point.)
 
 
==M3GM==
===export===
: ''onisplit -extract:obj output_folder input_folder\ONWCfile.oni''
: version hint:
:: onisplit v0.9.86.0 and v0.9.94.0 can not extract obj or dae (using this method)
:: onisplit v0.9.61.0 can extract M3GM only as obj
:: onisplit v0.9.41.0 can extract M3GM as obj or dae
 
===import===
In your 3D editor the weapon must be positioned on XZ plane and pointing into +X (weapon rotation 0, 0, 0).
 
The center is located in 0, 0, 0 while the weapon grasp ends at approximate position: X=0,3 Y=# Z=-0,5 and X=0,8 Y=# Z=-0,5
 
Now you can create a M3GM file from the geometry.
 
 
====new method====
To import or exchange weapon geometry simply insert the M3GM's file name into ONWC's <Geometry> tag. For example:
 
<Geometry>M3GMw1_tap_new</Geometry>
 
Don't use file suffix .oni
 
File prefix M3GM can be absent from the name, it's optional here.
 
M3GM files can be created with [[Vago_(tool)|Vago]].
 
When you convert the ONWC from xml back to oni be sure that the M3GM file is in the same folder.




<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://www6.fh-eberswalde.de/user/dkriesch/onistuff/subfold/text/oni_onwc_dc.txt text file] with commas as decimal hyphens (27 kb)</LI><LI>[http://www6.fh-eberswalde.de/user/dkriesch/onistuff/subfold/text/oni_onwc_dp.txt text file] with points as decimal hyphens (27 kb)</LI></UL></CENTER>
====old method====
There are some tags which make together the mesh but you basically need to know that you can replace that content with data from another M3GM.


You can create M3GM meshes from obj files.
: ''onisplit -create:m3gm output_folder -tex:weapon_tex input_folder/weapon.obj''
:: -tex is optional
:: The TXMP file must created separately (if needed).


<HR>
Then you can convert the file to xml and replace the ONWC's old M3GM xml code (in case you didn't start from scratch).
<CENTER>[[OBD:ONVL|<==]] <B>ONWC File</B> [[OBD:OPge|==>]]</CENTER>
<HR>


Remember to change the links (#N) and instance IDs of the new data.


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

Revision as of 05:58, 17 December 2015

ONWC : Oni Weapon Class
XML modding tips
  • See HERE to start learning about XML modding.
  • See HERE if you are searching for information on how to handle object coordinates.
  • See HERE for some typical modding errors and their causes.
XML.png
XML

ONVL << Other file types >> OPge

switch to OBD page

general information

  • The xml code on this page is compatible with onisplit v0.9.61.0
  • vanilla ONWC files are stored at/inside
    • Edition/install/VanillaDats/level0_Final/level0_Final (AE v6)
    • AE/AEInstaller/vanilla/level0_Final.dat (AE v7)


file structure

ONWC
  | 
  +-- M3GM (embedded 3D mesh)
        |
        +-- PNTA <Points>
        +-- VCRA <VertexNormals>
        +-- VCRA <FaceNormals>
        +-- TXCA <TextureCoordinates>
        +-- IDXA <TriangleStrips>
        +-- IDXA <FaceNormalIndices>
        +-- TXMP <Texture> (link to external file)


ONWC: Oni Weapon Class

XML tag type description
<LaserSight> see HERE
<AmmoMeter> see HERE
<Geometry> link Weapon instance number (#N). For geometry import/exchange see HERE.
<Name> char[32] ONWCfile.oni (don't use file prefix/suffix)
<MouseSensitivity> float weapon mouse sensitivity (applies on AI, too)
<Recoil> see HERE
<RecoilAnimationType> link an recoil animation type
<ReloadAnimationType> link an reload animation type
<PauseAfterReload> int16 pause after reload in 1/60 seconds
<MaxShots> int16 amount of shots

Let's say a weapon has 4 emitters each with <UsedAmmo>1 and the weapon shall be able to fire 3 times. Then <MaxShots> has to be 12 = 4 * 1 * 3.

A mismatching <MaxShots> number creates an infinite ammunition bug.

<ParticleCount> int16 amount of particles
<FiringModeCount> int16 amount of used firing modes (max = 2 ?)
<PauseBeforeReload> int16 pause before reload in 1/60 seconds
<ReleaseDelay> int16 release delay; delay between the moment the trigger is released and the moment the weapon stops firing
<Flags> flag weapon options
NoHolster
UsesCells
TwoHanded
RecoilAffectsAiming
Without this flag there will be still recoil. In any case the recoil makes the aim go upwards.
If flag is set: the aiming will stay the same after firing the gun.
If flag isn't set: the upward movement stops earlier and when the fire ended the arm will fall to the previous aiming position. (w1_tap observation)
Automatic
StunSwitcher
if enemy is inside shooting distance (between min and max) and is knockdowned/stunned or blownupped, AI with this weapon switches to melee for a time specified in a *fight timer* field
KnockdownSwitcher
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
Explosive
SecondaryFire
BarabbasWeapon
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
Heavy
AutoRelease
HasReleaseDelay
HasLaserSight
ScaleCrosshair
NoFade
DrainAmmo
<FiringModes> holds 2 <FiringModes> tags
<AIFiringMode> see HERE
<Particles> holds 16 <ONWCParticle> tags
<ONWCParticle> see HERE
<EmptyWeaponSound> link OSBDfile.imp.oni (don't use file prefix/suffix)
<Glow> link TXMPfile.oni (don't use file suffix)
<GlowAmmo> link TXMPfile.oni (don't use file suffix)
<GlowTextureScale> float x z scale factor of glow textures
<PickupHandleOffset> float x y z offset of pickup handle
<HoveringHeight> float hovering height of unheld weapon
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.


<LaserSight>

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
XML tag type description
<Origin> float x y z
<Stiffness> float x-component of laser sight direction ?
<AdditionalAzimuth> float wikipedia:Azimuth
<AdditionalElevation> float wikipedia:Elevation
<LaserMaxLength> float maximal length of laser sight vector
<LaserColor> color laser sight color: B G R A
<NormalTexture> link crosshair texture: TXMPfile.oni (don't use file suffix)
<NormalColor> color crosshair background color: B G R A
<NormalScale> float crosshair scale factor
<LockedTexture> link locked crosshair texture: TXMPfile.oni (don't use file suffix)
<LockedColor> color locked crosshair background color: B G R A
<LockedScale> float locked crosshair scale factor
<TunnelTexture> link tunnel texture
<TunnelColor> color tunnel background color: R G B A
<TunnelScale> float tunnel scale factor
<TunnelCount> int32 number of tunnel textures
<TunnelSpacing> float spacing of tunnel textures


<AmmoMeter>

XML tag type description
<Icon> link TXMPfile.oni (don't use file suffix)
<Empty> link TXMPfile.oni (don't use file suffix)
<Fill> link TXMPfile.oni (don't use file suffix)


<Recoil>

XML tag type description
<Base> float recoil base (e.g. for w1_tap and w2_sap)
<Max> float recoil max
<Factor> float recoil factor
<ReturnSpeed> float recoil return speed
<FiringReturnSpeed> float recoil firing return speed


<AIFiringMode>

w11_ba1 is the only original weapon that use also the second firing mode.

Transform matrix
Probably defines the orientation, scaling and position of the firing spread. It doesn't appear to be used.
XML tag type description
<Flags> flag NoWildShots
<InverseDirection> matrix4x3 targeting inverse transform matrix - the inverse of the matrix that gives the targeting direction
<Direction> vector3 targeting direction; sets orientation of firingspread
<Origin> vector3 targeting origin; sets deviation of A.I.'s aim from target's origin (target's origin + this vector = direction where to aim and fire)
<PredictionSpeed> float prediction speed; numeric speed of the projectile A.I. prediction takes into account when calculating where to fire in order to hit moving target
<MaxInaccuracyAngle> float 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
<AimRadius> float aim_radius; always the same; possible related to the inaccuracy angle above
<AISoundRadius> float weapon sound sphere radius; defines radius of the A.I. sound sphere (gunfire type, see HERE about A.I. sound spheres) which is created for a short moment when this weapon is fired
<MinShootingDistance> float minimal shooting distance; if target is closer than min.shoot.dist then A.I. ceases fire and moves away from the target till at least min.shoot.dis. is achieved; diameter, not a radius, so effective distance from A.I. to target is half of this value
<MaxShootingDistance> float maximal shooting distance; if target is further than max.shoot.dist then A.I. ceases fire and moves towards the target until at least max.shoot.dis. is achieved
<MaxStartleMisses> float maximum startle misses; probably the maximum number of shots an AI can miss when surprised before he starts aiming
<SkillIndex> int16 ONCC skill index
<FightTimer> int32 fight timer, 240 for w4_psm, 200 for v6_vdg
<ProjectileSpeed> float ballistic projectile speed (150 for SBG, 160 for WMC)
<ProjectileGravity> float ballistic projectile gravity, can be negative for firing at the enemy's feet (0.5 for SBG, 0.3 for WMC)
<FireSpreadLength> float length of a firingspread; A.I. can utilize gunfire dodge mechanics when it collides with some firingspread (read HERE); can be seen by *ai2_showfiringspreads=1* (180 for w1_tap, 150 for w2_sap, 120 for w4_psm)
<FireSpreadWidth> float length of the firingspread's base; can be seen by ai2_showfiringspreads=1
<FireSpreadSkew> float firingspread's skew; can be seen by ai2_showfiringspreads=1 (0.1 for w1_tap, 0.21 for w2_sap)
Fire spread

Note that the dodging fire spread set here is entirely separate from the weapon's actual fire spread, that is, the conical bullet fire that a weapon like the autopistol produces (see note at end of the PAR3 Emitters section). The dodging fire spread is separate in order to allow fine-tuning of the area from which the AI will attempt to escape, rather than simply relying on the calculated cone of weapons fire that is actually produced.


<ONWCParticle>

Transformation matrix
That's what defines orientation, stretching, etc.
See CRSA for details.
XML tag type description
<Transform> matrix4x3 transformation matrix xx xy xz yx yy yz zx zy zz + x y z offset of particle to weapon
<ParticleClass> link BINA3RAPfile.oni (don't use file prefix/suffix)
<UsedAmmo> int16 ammo decrement (different for the 2 firing modes of w11_ba1)
<ShotDelay> int16 normal delay between shots in frames
<RoughJusticeShotDelay> int16 'roughjustice' delay between shots in frames
<ActiveFrames> int16 number in frames for active firing mode (1st frame for activate); Used for w4_psm and w11_ba1
<TriggeredBy> int16
0 (particle is triggered by fire1)
1 (particle is triggered by fire2)
-1 (particle is triggered by both firing modes)
<DelayBeforeFiring> int16 delay before firing


particle adjustment

When adding particles in <ONWCParticle> section then the last three values of <Transform> are the particle start location.

Inside the 3D editor any object can serve as a helpful reference: pick one point of it and move it to the location from where the particle should be spawned. Copy the value into the xml file. (Caution: Mod Tool uses a comma as decimal mark, onisplit's xml files use a point.)


M3GM

export

onisplit -extract:obj output_folder input_folder\ONWCfile.oni
version hint:
onisplit v0.9.86.0 and v0.9.94.0 can not extract obj or dae (using this method)
onisplit v0.9.61.0 can extract M3GM only as obj
onisplit v0.9.41.0 can extract M3GM as obj or dae

import

In your 3D editor the weapon must be positioned on XZ plane and pointing into +X (weapon rotation 0, 0, 0).

The center is located in 0, 0, 0 while the weapon grasp ends at approximate position: X=0,3 Y=# Z=-0,5 and X=0,8 Y=# Z=-0,5

Now you can create a M3GM file from the geometry.


new method

To import or exchange weapon geometry simply insert the M3GM's file name into ONWC's <Geometry> tag. For example:

<Geometry>M3GMw1_tap_new</Geometry>

Don't use file suffix .oni

File prefix M3GM can be absent from the name, it's optional here.

M3GM files can be created with Vago.

When you convert the ONWC from xml back to oni be sure that the M3GM file is in the same folder.


old method

There are some tags which make together the mesh but you basically need to know that you can replace that content with data from another M3GM.

You can create M3GM meshes from obj files.

onisplit -create:m3gm output_folder -tex:weapon_tex input_folder/weapon.obj
-tex is optional
The TXMP file must created separately (if needed).

Then you can convert the file to xml and replace the ONWC's old M3GM xml code (in case you didn't start from scratch).

Remember to change the links (#N) and instance IDs of the new data.