Instant Death - KonradHeinser/EBSGFramework GitHub Wiki
This ability comp causes the target to die instantly, and contains a couple customization options for the exact effects. The basic comp looks something like this:
<comps>
<li Class="EBSGFramework.CompProperties_InstantKill">
</li>
</comps>
The comp technically works with just that, but you have some tags that you can use for customizing the death. The available tags for this are as follows:
- deleteCorpse : Default (True) : Removes the corpse after it's done with everything
- damageDefToReport : Default (Vaporize/Burn) : Usually only matters when the corpse is still around, this is the damageDef that gets used as the damage source
- explosionSound : Sound played when the pawn dies. Named as such because I assume it's going to be an explosion of some sort
- makeFilth : Default (True) : When set to false, no blood or other filth will be made
- bloodFilthToSpawnRange : Default (0~0) : The amount of blood produced from the death. Picks a random number in the range, or just the number itself if not using a range. The blood produced is based off of the race blood def
- multiplyBloodByBodySize : Default (True) : Multiplies the bloodFilthToSpawnRange result by the body size so larger pawns create more blood
- filthReplacement : A ThingDef to replace the blood with
- thingToMake : A ThingDef to make at the location
- bodySizeFactor : Default (1) : A multiplier on body size that determines the stack count of the thingToMake. For example, if this is set to 10, then a pawn with a body size of 1 will create 10 of the ThingDef, while a body size of 4 will create 40
- count : A static amount of the thingToMake to create. If the thing isn't something that comes in stacks, this should be set to 1. If a specific number should always be made, this should be set to that number. This overrides bodySizeFactor
- stuff : A ThingDef to use as stuffing for the thingToMake. If this is left empty and a stuffing is expected, it will first try to use the target's leatherDef if the thingToMake can be leathery, otherwise it will try to use the defaultStuff
Example of an ability that makes the target explode into a bunch of blood. Could be combined with blast attacks to make it an actual explosion with blood:
<AbilityDef>
<defName>Death</defName>
<label>instant death</label>
<iconPath>Things/Mote/SpeechSymbols/Speech</iconPath>
<category>Psychic</category>
<cooldownTicksRange>60</cooldownTicksRange>
<hostile>false</hostile>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>30</range>
<warmupTime>0.5</warmupTime>
<requireLineOfSight>False</requireLineOfSight>
<soundCast>PiercingSpine_Launch</soundCast>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_InstantKill">
<bloodFilthToSpawnRange>40</bloodFilthToSpawnRange>
<explosionSound>BuildingDestroyed_Stone_Big</explosionSound>
</li>
</comps>
</AbilityDef>