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">
</li>
</comps>
These are the nodes attached to the comp:
- damage : The DamageDef to apply. There is no default damage def, so this must be included for the comp to work
- 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>
<defName>InternalFire</defName>
<label>internal fire</label>
<description>Not what people mean when they say lighting the fire inside someone.</description>
<everCurableByItem>false</everCurableByItem>
<initialSeverity>0.001</initialSeverity>
<stages />
<hediffClass>HediffWithComps</hediffClass>
<scenarioCanAdd>false</scenarioCanAdd>
<comps>
<li Class="EBSGFramework.HediffCompProperties_DamageOverTime">
<damage>Burn</damage>
<createFilth>False</createFilth>
<damageAttachedPart>True</damageAttachedPart>
</li>
</comps>
</HediffDef>