Various Explosion Hediff Comps - KonradHeinser/EBSGFramework GitHub Wiki
These comps allow you to create explosions in various situations. These are all turned into their own comp to allow you to combine multiple into the same hediff. All of these have the same options available to them:
- EBSGFramework.HediffCompProperties_ExplodeOnDeath : Creates an explosion centered on the pawn when they die
- EBSGFramework.HediffCompProperties_ExplodeOnRemoval : Creates an explosion centered on the pawn when the hediff is removed
- EBSGFramework.HediffCompProperties_ExplodeWhenDamaged : Creates an explosion centered on the pawn when they receive any amount of damage
- EBSGFramework.HediffCompProperties_ExplosiveRetaliation : Creates an explosion centered on the attacker when the pawn receives any amount of damage
- EBSGFramework.HediffCompProperties_ExplodingAttacks : Create's an explosion centered on the pawn's target when they hit them with any attack
- EBSGFramework.HediffCompProperties_ExplodingMeleeAttacks : Create's an explosion centered on the pawn's target when they hit them with a melee attack
- EBSGFramework.HediffCompProperties_ExplodingRangedAttacks : Create's an explosion centered on the pawn's target when they hit them with a ranged attack
HediffCompProperties_ExplodeOnRemoval has one additional option that the others do not have, though this one is placed outside of the explosion node:
- allowDead : Default (True) : If the hediff is removed on death and you don't want the comp to activate in that situation, set this to False
Example of a hediff with 3 separate explosion types, a large explosion on death, a much smaller explosion when injured, and single target explosion that occurs with any attack:
<HediffDef>
<defName>Exploder</defName>
<label>exploder</label>
<description>This is a test hediff</description>
<everCurableByItem>false</everCurableByItem>
<initialSeverity>0.001</initialSeverity>
<stages />
<hediffClass>HediffWithComps</hediffClass>
<scenarioCanAdd>false</scenarioCanAdd>
<comps>
<li Class="EBSGFramework.HediffCompProperties_ExplodeOnDeath">
<explosion>
<radius>10</radius>
<damageDef>Burn</damageDef>
<exclusions>Self</exclusions>
<explosionSound>Foam_Impact</explosionSound>
<preExplosionThing>Filth_Fuel</preExplosionThing>
<preExplosionThingChance>1</preExplosionThingChance>
<chanceToStartFire>0.50</chanceToStartFire>
<damageAmount>40</damageAmount>
</explosion>
</li>
<li Class="EBSGFramework.HediffCompProperties_ExplodeWhenDamaged">
<explosion>
<radius>3</radius>
<damageDef>Burn</damageDef>
<exclusions>Self</exclusions>
<explosionSound>Foam_Impact</explosionSound>
<preExplosionThing>Filth_Fuel</preExplosionThing>
<preExplosionThingChance>1</preExplosionThingChance>
<chanceToStartFire>0.75</chanceToStartFire>
<damageAmount>10</damageAmount>
</explosion>
</li>
<li Class="EBSGFramework.HediffCompProperties_ExplodingAttacks">
<explosion>
<radius>0.5</radius>
<damageDef>Burn</damageDef>
<exclusions>Self</exclusions>
<explosionSound>Foam_Impact</explosionSound>
<preExplosionThing>Filth_Fuel</preExplosionThing>
<preExplosionThingChance>1</preExplosionThingChance>
<chanceToStartFire>1</chanceToStartFire>
<damageAmount>10</damageAmount>
</explosion>
</li>
</comps>
</HediffDef>