XML:TURR

From OniGalore
Revision as of 12:05, 9 November 2012 by Paradox-01 (talk | contribs) (+ temp + cat // another page to move ..)
Jump to navigation Jump to search
TURR : Turret 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

TRSC << Other file types >> TXMB

switch to OBD page

general information

  • The xml code on this page is compatible with onisplit v0.9.61.0 and 0.9.68.0
  • 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

XML tag content type description
<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 ?
<ArmTranslation> float X Y Z translation for turret head (body-relative)
<WeaponTranslation> float 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>
XML tag content type description
<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>
XML tag content 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
<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>
XML tag content type description
<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.

XML tag content type description
<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


embedded M3GM

export

You would need to cut TURR instance so that only the M3GM and its connected instances remain and convert it to oni.

onisplit -extract:xml output_folder input_folder\TURRfile.oni
onisplit -create output_folder input_folder\cutfile.xml

version hint:

onisplit v0.9.61.0 and v0.9.68.0 can extract M3GM only as obj
onisplit v0.9.41.0 can extract M3GM as obj or dae

Convert the M3GMfile.oni to obj:

onisplit -extract:obj output_folder input_folder\M3GMfile.oni


import

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.

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 TURR's old M3GM xml code.

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