XML:TURR

From OniGalore
Revision as of 12:44, 14 April 2012 by Paradox-01 (talk | contribs) (...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:XMLModdingHints

The xml code on this page is compatible with onisplit v0.9.61.0

general information

  • TURR file are stored globally (in edition/GameDataFolder/level0_Final)
  • M3GM <BaseGeometry> isn't used, the turret pod is part of the AKEV level geometry


file structure

the 3 exported M3GM instances
TURR_Geometries_tn.png
TURR
  | 
  +-- M3GM <BaseGeometry> (not used, turret pod must be part of the AKEV level geometry)
  |     |
  |     +-- PNTA <Points>
  |     +-- VCRA <VertexNormals>
  |     +-- VCRA <FaceNormals>
  |     +-- TXCA <TextureCoordinates>
  |     +-- IDXA <TriangleStrips>
  |     +-- IDXA <FaceNormalIndices>
  |     +-- TXMP <Texture> (link to external file)
  |
  +-- M3GM <ArmGeometry>
  |     |
  |   [...]
  |
  +-- M3GM <WeaponGeometry>
        |
      [...]


XML tags

TURR

<Name> char[64] file name without file prefix TURR and suffix .oni
<ParticleCount> int16 number of <TURRParticle> that are actually used
<Offset_0058> int16 ?
<BaseGeometry> link M3GM instance number (#N)
<BaseGunkFlags> flag ?
<ArmGeometry> link M3GM instance number (#N)
<ArmGunkFlags> flag ?
<WeaponGeometry> link M3GM instance number (#N)
<WeaponGunkFlags> flag ?
<WeaponTranslation> float X Y Z translation for turret head (body-relative), X Y Z translation for turret gun (head-relative)
<Particles> holds 16 <TURRParticle>
<TURRParticle> see HERE
<FiringMode> see HERE
<Targeting> see HERE
<WeaponSkill> see HERE
<Timeout> int32 timeout in frames
<MinElevation> float minimum elevation in radians
<MaxElevation> float maximum elevation in radians
<MinAzimuth> float minimum azimuth in radians
<MaxAzimuth> float maximum azimuth in radians
<MaxVerticalSpeed> float maximum vertical speed in radian/frame
<MaxHorizontalSpeed> float maximum horizontal speed in radian/frame
<ActiveSound> link OSBDfile.amb.oni


<TURRParticle>

<ParticleClass> link particle file name without file prefix BINA3RAP and suffix .oni
<ShotFrequency> int32 delay between shots in frames: X/60
<FiringModeOwner> flag
0 (?)
-1 (?)
-8531 (?)
<Transform> float coefficients of transform matrix: x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4


<FiringMode>

<Flags> flag NoWildShots
<InverseDirection> matrix4x3 targeting inverse transform matrix - the inverse of the matrix that gives the targeting direction
<Direction> vector3 targeting direction
<Origin> vector3 targeting origin
<PredictionSpeed> float prediction speed
<MaxInaccuracyAngle> float inaccuracy tolerance; always 0 for TURR
<AimRadius> float aim radius; always the same for TURR and ONWC
<AISoundRadius> float sound sphere radius; always the same for TURR
<MinShootingDistance> float minimal shooting distance; always 0 for TURR
<MaxShootingDistance> float maximal shooting distance; always 0 for TURR
<MaxStartleMisses> int16 maximum startle misses
<SkillIndex> int16 AI shooting skill ID; always 0 for TURR
<FightTimer> int16 fight timer; always 0 for TURR; 240 for ONWCw4_psm, 200 for ONWCv6_vdg
<ProjectileSpeed> float ballistic projectile speed (150 for ONWCw5_sbg, 160 for w11_ba1); always 0 for TURR
<ProjectileGravity> float ballistic projectile gravity (0.5 for ONWCw5_sbg, 0.3 for w11_ba1); always 0 for TURR
<FireSpreadLength> float length of firing spread; always 0 for TURR
<FireSpreadWidth> flaot width of firing spread; always 0 for TURR
<FireSpreadSkew> float skew angle of firing spread; always 0 for TURR


<Targeting>

<StartleMissAngle> float always the same for TURR and ONCC (0.5)
<StartleMissDistance> float always the same for TURR and ONCC (25)
<PredictAmount> float always the same for TURR (1.0)
<PredictPositionDelayFrames> int32 always the same for TURR (0)
<PredictDelayFrames> int32 always the same for TURR (5)
<PredictVelocityFrames> int32 always the same for TURR (15)
<PredictTrendFrames> int32 always the same for TURR (60)


<WeaponSkill>

All the TURR have the same shooting skill.

<RecoilCompensation> float min = 0.0, max = 1.0
<BestAimingAngle> float best aiming angle in radians
<ShotGroupError> float shot grouping error
<ShotGroupDecay> float shot grouping decay
<ShootingInaccuracyMultiplier> float shooting inaccuracy multiplier
<MinShotDelay> uint16 minimum delay between shots in frames
<MaxShotDelay> uint16 maximum delay between shots in frames


M3GM

Are there 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. and then convert it to xml.

onisplit v0.9.61.0 refuse to convert a single M3GM, use for that onisplit v0.9.41.0

Then you can replace old M3GM xml code with your new one.

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