XML:TURR: Difference between revisions
m (copy-edit) |
m (using Image: consistently to make it easier to find all image refs on a page) |
||
| Line 312: | Line 312: | ||
==Vanilla classes== | ==Vanilla classes== | ||
[[ | [[Image:XSI_ModTool_VanillaTURRs.jpg|400px|thumb]] | ||
==3D model== | ==3D model== | ||
Latest revision as of 17:38, 21 February 2022
| TURR : Turret |
| |
|---|---|---|
| XML
TSFF << Other file types >> TXCA |
General information
- The XML on this page is compatible with OniSplit v0.9.61.0 and 0.9.68.0.
- TURR files are stored globally in level0_Final.dat.
- TURR instances for a level are stored in BINACJBOTurret.
- The M3GM in <BaseGeometry> isn't used; instead the turret body is part of the AKEV level geometry.
File structure
TURR
|
+-- M3GM <BaseGeometry> (not used; turret body 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 prefix "TURR" and suffix ".oni". |
| <ParticleCount> | int16 | Number of <TURRParticle>s 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 | XYZ translation for turret head (body-relative). |
| <WeaponTranslation> | float | XYZ translation for turret gun (head-relative). |
| <Particles> | Holds 16 <TURRParticle>s, though only 2 or 3 will be used and the rest will be placeholders. | |
| <TURRParticle> | See THIS section below. | |
| <FiringMode> | See THIS section below. | |
| <Targeting> | See THIS section below. | |
| <WeaponSkill> | See THIS section below. | |
| <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 radians per frame. |
| <MaxHorizontalSpeed> | float | Maximum horizontal speed in radians per 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. |
| <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 | Minimum shooting distance; always 0 for TURR. |
| <MaxShootingDistance> | float | Maximum 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 TURRs have the same shooting skill settings.
| 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. |
Vanilla classes
3D model
Export (new method)
With OniSplit v0.9.94.0+ (and possibly a few older versions), you can extract the DAE together with the XML from the .oni.
- onisplit -extract:xml output_folder input_folder\TURRfile.oni
Export (old method)
You would need to trim the TURR instance so that only the M3GM and its connected instances remain, and save that as a .oni file.
- onisplit -extract:xml output_folder input_folder\TURRfile.oni
- onisplit -create output_folder input_folder\cutfile.xml
Version advice:
- 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 (new method)
There's a bug in OniSplit: before you can convert the DAE and XML back into a .oni, you must clean up some tags in the XML file.
For example, looking at TURRvdg_turret_wall.xml…
<ParticleCount>4</ParticleCount>
…that means 4 <ParticleClass> are used and the rest are not. However, those unused elements contain garbage like "<ParticleClass>�ޭޭޭޭޭޭޭ�</ParticleClass>". Remove that content, making it "<ParticleClass></ParticleClass>". Then you can re-import.
Import (old method)
You can replace the M3GM content with data from another M3GM.
You first 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.
