XML:TURR
TURR : Turret class | ||
---|---|---|
XML
TRSC << Other file types >> TXMB |
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 AE/AEInstaller/vanilla/level0_Final.dat)
- M3GM <BaseGeometry> isn't used, the turret pod is part of the AKEV level geometry
file structure
the 3 exported M3GM instances |
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 |
|
<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
new export method
With OniSplit v0.9.94.0+ (and possibly a few older versions) you can extract dae together with xml from the oni.
- onisplit -extract:xml output_folder input_folder\TURRfile.oni
old export method
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
new import method
There's a bug in OniSplit. Before you can re-convert dae and xml to oni, you must clean some tags in the xml file.
For example TURRvdg_turret_wall.xml
<ParticleCount>4</ParticleCount>
That means 4 <ParticleClass> are used, the others are not.
They contain garbage like <ParticleClass>�ޭޭޭޭޭޭޭ�</ParticleClass>. Remove that content, make it: <ParticleClass></ParticleClass>.
Then you can re-convert.
old import method
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.