Composite Actor Types - guidebee/OpenRA GitHub Wiki
OpenRA uses composite actors in several cases — not just tanks — to allow for more complex rendering, animation, and logic. A composite actor is one composed of multiple independently rendered parts, often with independent behavior or visuals.
Here are some notable examples of composite actors in OpenRA:
Example: medtank
, v2rl
, artl
(RA mod)
-
Traits:
-
WithFacing
,RenderSprites
– for tank body -
Turreted
,TurretRender
– for turret
-
-
Why composite: Turret rotates independently of movement
Example: sam
(RA mod)
-
Traits:
-
WithFacing
,RenderSprites
– for the base -
Turreted
,TurretRender
– for the missile launcher
-
-
Animation: Launcher raises/rotates to track aircraft
-
Effect: Realistic turret movement even on static structures
Example: tran
(Transport helicopter)
-
Traits:
-
RenderSprites
– for helicopter body -
RenderableChild
orRenderSprites
with animation states – for side door
-
-
Why composite: Door opens when unloading troops
-
Sometimes: Rotors may be animated separately in modded versions
Example: yatech
(Yard Tech Center in RA)
-
Traits:
-
RenderSprites
– base -
RenderableChild
– crane arm, animated when producing
-
-
Why composite: To animate just part of the building independently (like a rotating crane arm)
Example: mslo
(RA nuke silo)
-
Traits:
-
RenderSprites
– for the building -
RenderableChild
,Animation
– for missile hatch opening
-
-
Why composite: Hatch opens during launch sequence
Example: gap
(RA)
-
Traits:
-
RenderSprites
– base structure -
RenderableChild
or special animation – pulsing overlay effect
-
-
Why composite: Constant visual effect rendered independently
Example: mcv
(RA)
-
Traits:
-
TransformOnDeploy
– turns from mobile unit into a building -
RenderSprites
– mobile state -
Deployment state might have different parts
-
-
Composite: If modded, MCVs can show folding animations using multiple parts
In community mods or Tiberian Sun-inspired mods, composite actors are used for:
-
Energy shields
-
Hover fans / rotors
-
Turrets mounted on walkers
-
Deployable units with parts that animate during setup
Traits often involved:
RenderSprites | Main body rendering |
---|---|
TurretRender | Renders a turret that rotates independently |
RenderableChild | Renders an attached component (e.g., arm, door) |
Turreted | Controls turret rotation |
WithFacing | Controls actor's body facing |
Animation | Plays frame sequences (e.g., opening doors) |
✅ Summary of Composite Actor Types
Actor Type | Example | Composite Parts |
---|---|---|
Tank | medtank | Body + turret |
SAM Site | sam | Base + rotating launcher |
Transport Helicopter | tran | Body + door (or rotor) |
Construction Yard | yatech | Base + crane arm |
Missile Silo | mslo | Base + missile hatch |
Gap Generator | gap | Base + pulse effect |
Modded Hovercraft | Custom | Hull + rotor + shadow |