Skip to content

ProductionAnim

Changed in 0.2.0

The animation a structure plays as it delivers what it built, after a harvester unloads, or while it repairs a vehicle.

Specification
Applies to
BuildingType
File
art.ini
Section
[<Image ID>]Image ID: Image= value; ObjectType ID when omitted
Value
string
When omitted
(empty)

ProductionAnim names an animation registered in [Animations]. The structure plays it in its production slot, one of the animation slots that Building animations describes. The animation is drawn at a fixed point on the structure and runs at its own rate. The slot holds one animation at a time.

Only the first 15 characters of the name are kept, and a name that no [Animations] entry registers creates nothing.

Five kinds of structure start the production animation, each at a different moment.

StructureStarts whenStops when
ConstructionYard=yesA structure it built finishes its buildupThe animation ends
Refinery=yesThe docked harvester has unloaded the last of its load, or the docked harvester is given a destination and a queued mission other than harvestingThe animation ends
UnitRepair=yesThe depot begins repairing the vehicle on itThe repair finishes, the house cannot pay for the next repair step, the vehicle leaves or loses contact with the depot, or the depot stops repairing
WeaponsFactory=yesThe door begins opening for a finished vehicleThe animation ends
Any other structure with Factory=A finished vehicle or soldier leaves itThe animation ends

A looping animation never ends by itself, so on every row but the service depot it keeps playing until the structure is sold, undeployed or removed.

The last row covers barracks, and structures that build vehicles without WeaponsFactory=yes. A Hospital=yes or Armory=yes structure does not start the animation when a healed or upgraded soldier leaves, unless its Factory= is InfantryType. Tiberian Sun ships no structure in that row with a ProductionAnim, so the row matters only to a mod that adds one.

The production animation has no power settings and always behaves as …Powered=yes, so a power shortfall or an EMP pulse can freeze it on its current frame. Power covers when it freezes and when it resumes.

The two animation names, ProductionAnim and ProductionAnimDamaged, are read from the structure’s [<Image ID>] art entry. The X and Y offsets and the two draw-order biases are read from the art entry named after the BuildingType itself, and only when the Image ID entry names at least one of the two animations. For an ordinary structure, which sets no Image=, both are the same entry. A type that borrows another structure’s artwork must write the names and the offsets in two different entries. Where each setting is read from gives the same split for every slot.

rules.ini
[MYPROC] ; example refinery BuildingType
Image=NAREFN ; its art entries are read from [NAREFN]
art.ini
[NAREFN] ; the Image ID entry supplies the two names
ProductionAnim=NAREFN_AR
PreProductionAnim=NAREFN_A
[MYPROC] ; the type's own entry supplies the offsets and biases
ProductionAnimX=-2
ProductionAnimY=2
ProductionAnimZAdjust=-100

History

  1. Changed0.2.0In development

    Let barracks and vehicle factories run their production animation