Animal Behaviours Damage Workers - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
The AnimalBehaviours module of Vanilla Expanded Framework adds three types of Damage Workers that can be used:
- DamageWorker_ExtraInfecter: A damage class that causes additional infections when causing damage. The percentage chance is passed by adding a comp class, CompInfecter, to the animal using this damage class. So to use this Damage Worker you'll need to add both: the Comp Class is added to the animal, while the Damage Worker is added to the DamageDef you want to modify.
- DamageWorker_Berserk: A damage class that makes affected pawns go Berserk.
- Extra damage: We have included four Damage Workers that cause extra damage
- DamageWorker_ExtraDamageInsectoids: Causes extra Cut damage to any pawn with FleshTypeDefOf.Insectoid
- DamageWorker_ExtraDamageMechanoids: Causes extra EMP damage to any pawn with FleshTypeDefOf.Mechanoid
- DamageWorker_ExtraDamagePirates: Causes extra Scratch damage to any pawn belonging to the Pirate base game faction
- DamageWorker_ExtraDamageAnimals: Causes extra Cut damage to animals
First of all, remember that you'll need to create a new ToolCapacityDef as well as Maneuver to make the animal use the attack.
Damage Workers must be added as a custom class of the desired DamageDef. For example, the Xiezhi in Magical menagerie uses this DamageDef to cause extra damage to Pirates:
<DamageDef>
<defName>MM_ExtraDamageToPiratesHorn</defName>
<label>horn of justice</label>
<workerClass>AnimalBehaviours.DamageWorker_ExtraDamagePirates</workerClass>
<externalViolence>true</externalViolence>
<deathMessage>{0} has been stabbed to death.</deathMessage>
<hediff>Stab</hediff>
<hediffSolid>Crack</hediffSolid>
<impactSoundType>Slice</impactSoundType>
<armorCategory>Sharp</armorCategory>
<stabChanceOfForcedInternal>0.6</stabChanceOfForcedInternal>
<overkillPctToDestroyPart>0.4~1.0</overkillPctToDestroyPart>
</DamageDef>