forked from RimWorld-CCL-Reborn/JecsTools
-
Notifications
You must be signed in to change notification settings - Fork 18
CompAnimated
Matthew Walls edited this page Oct 12, 2018
·
1 revision
Makes animated sprites appear for Pawns (Characters, Animals, etc).
Bat artwork is courtesy of Draegon1993.
Here is an XML example (parts have been removed with <...>s) of the Bats I use in the Rim of Madness - Vampire mod.
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<ThingDef ParentName="ROMV_AnimalThingBase">
<defName>ROMV_BatRace</defName>
<label>bat</label>
...
<comps>
<li Class="CompAnimated.CompProperties_Animated">
<movingFrames>
<li>
<texPath>Things/Pawn/Animal/BatVampire/Draegon1993BatVampireA</texPath>
<color>(110,95,82)</color>
<drawSize>2.2</drawSize>
<shaderType>CutoutComplex</shaderType>
<graphicClass>Graphic_Multi</graphicClass>
</li>
<li>
<texPath>Things/Pawn/Animal/BatVampire/Draegon1993BatVampireB</texPath>
<color>(110,95,82)</color>
<drawSize>2.2</drawSize>
<shaderType>CutoutComplex</shaderType>
<graphicClass>Graphic_Multi</graphicClass>
</li>
</movingFrames>
<sound/>
<secondsBetweenFrames>0.15</secondsBetweenFrames>
</li>
</comps>
...
</ThingDef">
</Defs>
::Note:: Characters that use this component do not use the lifestage graphics.
Here is the current list of parameters in CompAnimated.CompProperties_Animated
and what they do.
- sound - When set, this will play a sound when the animation cycles.
- secondsBetweenFrames - The number of seconds between each frame of animation.
-
movingFrames - A list of frames (
GraphicData
) when the character is moving. Use<li></li>
to add in each frame. -
stillFrames - A list of frames (
GraphicData
) when the character is at rest.
Add Abilities to Characters
Add Abilities to Equipment
Add Genes to PawnKindDefs
Add Animations and Sounds
- CompAnimated
- CompAnimatedOver
- CompOverlays
- CompExtraSounds
- CompOversizedWeapon
- CompActivatableEffect
- CompLumbering
- CompDelayedSpawer
- CompToggleDef
Add Vehicles
Add Weapon / Armor / Health Effects
Add World Jobs
Misc