TurretAnim
The animation a building's turret is drawn from, or the voxel model that replaces it.
- Applies to
- BuildingType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- string
- When omitted
(empty)
Unless TurretAnimIsVoxel=yes is set, the value is an AnimType ID, and that animation is attached to the building’s turret slot once the structure is finished, placed at the offset TurretAnimX and TurretAnimY name. Its frame is chosen again every game frame: a turret-equipped building shows the frame matching the direction its turret points, one of 32, while a ChargeAnim=yes building shows the frame its charge sequence has reached instead.
With TurretAnimIsVoxel=yes nothing is attached to the turret slot and the value is a voxel base name instead. With BarrelAnimIsVoxel=yes alone the value stays an AnimType ID and the animation is still attached — the building simply draws it itself rather than leaving it to the layer. The voxel name is derived under either flag — <name>.VXL with the <name>.HVA beside it. It is loaded as the turret model only when TUR appears in it at the fifth character or later; the barrel model’s name is then that same name with the TUR and everything after it replaced by BARL, and VoxelBarrelFile is not consulted. Without that TUR no turret model is loaded at all, and a TurretAnimIsVoxel=yes building draws the named model as its barrel, as one piece that both turns and elevates.
[MYTOWER] ; a BuildingType registered in [BuildingTypes]Turret=yesTurretAnimIsVoxel=yesTurretAnim=MYTWRTUR ; drawn from MYTWRTUR.VXL, its barrel from MYTWRBARL.VXLThe building named by WallTower starts from this setting like any other, but its first upgrade takes over: from then on its turret animation is its own Image ID with _B, _C or _D appended, stepping to the next letter each time an upgrade is plugged in and wrapping back to _B after the third.
TurretAnimDamaged, TurretAnimIsVoxel, BarrelAnimIsVoxel, VoxelBarrelFile, TurretAnimX, Turret