Destroy Filth - KonradHeinser/EBSGFramework GitHub Wiki
This ability comp destroys filth on the target location, or around the target location if Ability_EffectRadius is greater than 0. The basic comp looks like this:
<comps>
<li Class="EBSGFramework.CompProperties_AbilityDestroyFilth">
</li>
</comps>
These are the options available in the comp:
- amount : Default (1~5) : The amount of thickness that can be removed. The default amount generally destroys all filth on the cell. If the range is set to something else (i.e. 2~4), then the ability only works on filth with a thickness within that range, but all of that filth will always be destroyed completely. If only a single value is used (i.e. 3), then any filth with a thickness at or greater than that value can potentially be targeted, but filth with a thickness greater than the value will only have that thickness reduced instead of having the filth completely get destroyed
- validFilth : A list of ThingDefs that can be targeted. If this is used, all other ThingDefs will be considered invalid
- invalidFilth : A list of ThingDefs that cannot be targeted
This example combines this comp with Offset Needs to become a trash panda. It requires at least 3 thickness on the trash pile, but if the pile has more it will not be completely destroyed:
<AbilityDef>
<defName>EatFilth</defName>
<label>eat filth</label>
<description>Trash panda.</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>
<targetParams>
<canTargetLocations>True</canTargetLocations>
</targetParams>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityDestroyFilth">
<amount>3</amount>
<validFilth>
<li>Filth_Trash</li>
</validFilth>
</li>
<li Class="EBSGFramework.CompProperties_AbilityOffsetNeed">
<casterNeedOffsets>
<li>
<need>Food</need>
<offset>0.3</offset>
</li>
</casterNeedOffsets>
</li>
</comps>
</AbilityDef>
This example destroys most filth in the area around the pawn that has a thickness of at least 2, with the exception of firefoam:
<AbilityDef>
<defName>Vacuum</defName>
<label>vacuum</label>
<description>Trash be gone.</description>
<iconPath>Things/Mote/SpeechSymbols/Speech</iconPath>
<cooldownTicksRange>60</cooldownTicksRange>
<hostile>false</hostile>
<targetRequired>False</targetRequired>
<canUseAoeToGetTargets>False</canUseAoeToGetTargets>
<statBases>
<Ability_EffectRadius>4.9</Ability_EffectRadius>
</statBases>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>4.9</range>
<warmupTime>0.5</warmupTime>
<requireLineOfSight>False</requireLineOfSight>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityDestroyFilth">
<amount>2~5</amount>
<invalidFilth>
<li>Filth_FireFoam</li>
</invalidFilth>
</li>
</comps>
</AbilityDef>