Remove at Severities - KonradHeinser/EBSGFramework GitHub Wiki
This Hediff Comp allows you to force hediffs to be removed at certain severities instead of only occurring at 0. The basic comp looks like this:
<comps>
<li Class="EBSGFramework.HediffCompProperties_RemoveAtSeverities">
</li>
</comps>
These are the options available within the comp:
- severity : A float, or range of floats, that trigger the removal. When a single value is put in, then any severity level above that value causes the removal
- severities : A list of float ranges that each get processed similar to severity. Any single one can cause the removal, and if any of them are put as a single value, then any severity level above that causes the removal
This example combines this comp with one of the various explosive hediff comps to create an effect that explodes when severity gets high enough. If that comp was multiplying damage or radius by severity, this would allow for things like Severity Setters to scale up the explosion based on certain situations, though because this is a basic example, it only uses HediffCompProperties_SeverityPerDay:
<HediffDef>
<defName>TimedExploder</defName>
<label>timed exploder</label>
<description>.</description>
<everCurableByItem>false</everCurableByItem>
<initialSeverity>0.001</initialSeverity>
<stages />
<hediffClass>HediffWithComps</hediffClass>
<scenarioCanAdd>false</scenarioCanAdd>
<comps>
<li Class="EBSGFramework.HediffCompProperties_RemoveAtSeverities">
<severity>0.9</severity>
</li>
<li Class="HediffCompProperties_SeverityPerDay">
<severityPerDay>20</severityPerDay>
</li>
<li Class="EBSGFramework.HediffCompProperties_ExplodeOnRemoval">
<allowDead>True</allowDead>
<radius>10</radius>
<damageDef>Burn</damageDef>
<exclusions>None</exclusions>
<extraGasType>None</extraGasType>
<explosionSound>Foam_Impact</explosionSound>
<preExplosionThing>Filth_Fuel</preExplosionThing>
<preExplosionThingChance>1</preExplosionThingChance>
<chanceToStartFire>0.50</chanceToStartFire>
<damageAmount>40</damageAmount>
</li>
</comps>
</HediffDef>