Jump to content

Turret

From ModEnc²
Revision as of 13:07, 8 December 2024 by en>Testid123
Tiberian Dawn Red Alert Tiberian Sun Firestorm Red Alert 2 Yuri's Revenge
Flag: Turret
File(s): Rules(md).ini
Values: boolean
Default: no
Applicable to: VehicleTypes, BuildingTypes


Specifies whether this object has a turret.

On VehicleTypes
The turret filename has to be the same as the object's, with the suffix tur, and be in VXL format, with an accompanying HVA. Should [UNIT] have Turret=yes set but no file with the name unittur exist, the game will crash.
On AircraftTypes

It was hardcoded to not have a turret. Even though there is a tag Turret=yes.

On BuildingTypes
The turret filename is specified by TurretAnim, should be the same as on VehicleTypes, and its format is specified by TurretAnimIsVoxel. If the turret is in SHP format, it should be defined in art(md).ini and listed in [Animations] in order to be loaded by the game. If the turret is in VXL format, this is not necessary.

If BuildingTypes does not have the tag TurretAnim, but has the tag TurretAnimIsVoxel=yes and other related tags (TurretAnimX,TurretAnimY,TurretAnimZAdjust) The game will use the Voxel turret image according to the image of the BuildingTypes defined, e.g.
[GAPILL]
Image=LTNK
The game uses the image of the Lasher Light Tank's turret instead.
If you wish to have BuildingTypes use this BuildingTypes turret You must meet the following conditions:
You need the files Voxeltur.hva (Turret name must be the same as the Image used with BuildingTypes) and Voxeltur.vxl (Turret name must be the same as the Image used with BuildingTypes) and Image of BuildingTypes must have Voxel=yes in Artmd.ini

File:TurretAnimIsVoxel=True on a sloping area.png

Bugs/Side-Effects/Unexpected Limitations

IE Warning:
Without considering any extension engines, for a vehicle with Image=<none>, even if it should not have an image or create an empty Shape image due to Image settings, if you add Turret=yes, the game will still attempt to obtain a Voxel Turret section, and you will receive a internal error. Congratulations. xD Only God knows about such an outrageous work logic.