Alter Xenotype (Ability) - KonradHeinser/EBSGFramework GitHub Wiki
This ability comp will immediately change the pawn's xenotype to either a static xenotype, or a xenotype resembling the caster's. The basic comp is set up like this:
<comps>
<li Class="EBSGFramework.CompProperties_AbilityAlterXenotype">
<xenotypes>
<InsertXenotypeDefNameHere>1</InsertXenotypeDefNameHere>
</xenotypes>
</li>
</comps>
These are the options available in the comp:
- xenotypes : A weighted list that uses xenotype defNames as the tag, and the weight as the value. If useCasterXeno is set to true, this is not needed
- useCasterXeno : Default (False) : When true, the ability will use the pawn's xenotype (or at least their current genes), to override the target's
- filth : A ThingDef to create around the pawn when the comp triggers
- filthCount : Default (4-7) : How many of the filth to create, if filth is used
- setXenotype : Default (True) : While true, most old genes are removed, with the only exceptions being hair and skin color endogenes. When false, only genes that are incompatible with genes from the new xenotype are removed, creating a type of hybrid that still uses the new xenotype's name
- sendMessage : Default (True) : Send a message when the genes are overwritten
This example will turn the pawn into a hybrid of their current xenotype combined with either a dirtmole or a pigskin, and creates a little bit of blood under the target when it happens:
<AbilityDef>
<defName>Pigmole</defName>
<label>pigmole</label>
<description>Turns the pawn into a hybrid of their current xenotype, and either a dirtmole (60% chance) or a pigskin (40% chance). There's also some blood to make it more dramatic.</description>
<iconPath>Things/Mote/SpeechSymbols/Speech</iconPath>
<cooldownTicksRange>60</cooldownTicksRange>
<hostile>false</hostile>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>30</range>
<warmupTime>0.5</warmupTime>
<requireLineOfSight>False</requireLineOfSight>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityAlterXenotype">
<xenotypes>
<Dirtmole>6</Dirtmole>
<Pigskin>4</Pigskin>
</xenotypes>
<filth>Filth_Blood</filth>
<setXenotype>False</setXenotype>
<sendMessage>False</sendMessage>
</li>
</comps>
</AbilityDef>