Damage Over Time - KonradHeinser/EBSGFramework GitHub Wiki
This hediff comp will cause constant damage for its duration either to its attached part, a random item from a list of parts, or a completely random body part. The basic comp looks like this:
<comps>
<li Class="EBSGFramework.HediffCompProperties_DamageOverTime">
<damage>InsertDamageDefNameHere</damage>
</li>
</comps>
There is no default DamageDef assigned, so the damage tag is always required. These are the other tags attached to the comp:
- tickInterval : Default (200) : How many ticks there should be between part damagings. There are 60 ticks per second
- damageAmount : Default (1) : How much damage to deal at the end of each interval. If set to -1, it should default to what the DamageDef lists
- armorPenetration : Default (0) : How well it ignores armor. If set to -1, it should default to what the DamageDef lists
- createFilth : Default (True) : Creates filth (i.e. blood) when the pawn is damaged if true
- damageAttachedPart : Default (False) : When true, it will damage the part it's attached to if possible
- bodyParts : List of body parts that are randomly picked from for damaging purposes if damageAttachedPart is false, or there isn't an attached part
To make the hediff pick a completely random part, just leave damageAttachedPart as false, and don't add any bodyParts
This example hediff will constantly deal 1 burn damage every 200 ticks (3.33 seconds) to the body part it's attached to, or a completely random one if it's attached to the whole body
<HediffDef ParentName="EBSG_TestHediffBase">
<defName>InternalFire</defName>
<label>internal fire</label>
<description>Not what people mean when they say lighting the fire inside someone.</description>
<comps>
<li Class="EBSGFramework.HediffCompProperties_DamageOverTime">
<damage>Burn</damage>
<createFilth>False</createFilth>
<damageAttachedPart>True</damageAttachedPart>
</li>
</comps>
</HediffDef>