Severity Change When Hit - KonradHeinser/EBSGFramework GitHub Wiki
This hediff comp allows you to alter the severity of a hediff whenever the pawn is hit. The basic comp setup looks like this:
<comps>
<li Class="EBSGFramework.HediffCompProperties_SeverityChangeWhenDamaged">
</li>
</comps>
There are two ways this can increase severity, though they aren't mutually exclusive if you wish to include both of them
- severityChange : Default (0) : Static amount to change the severity by
- severityChangeFactor : Default (0) : Amount to multiply the damage amount by. For example, if set to 0.01, a damage of 10 increases severity by 0.1
There are additional tags that can be used to add conditionals for when the severity change can occur:
- cooldownTicks : Default (0) : Requires a certain number of ticks occur between hits to avoid rapid increases/decreases caused by extremely fast weapons being used against the pawn, or to add a limiter for any other purpose
- validSeverity : Default (0~99999) : Causes the effect to only activate when in this range. If a single value is entered, then any severity above that number will be considered valid
- validDamageDefs : A list of DamageDef defNames that trigger this comp
- forbiddenDamageDefs : List of DamageDef defNames that prevent this comp from triggering. If using validDamageDefs, this won't do anything
Unfortunately, I do not have an example to provide at the moment