Explode on x - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
This comprises four different classes: HediffComp_ExplodeOnDamage, HediffComp_ExplodeOnDowned, HediffComp_ExplodeOnFire and HediffComp_Exploder (on death)
        public int minDamageToExplode;
        public DamageDef damageType;
        public int damageAmount = -1;
        public float radius;
        public SoundDef sound = null;
        public ThingDef spawnThingDef = null;
        public float spawnThingChance = 0f;    No parameters needed
        public int minFireToExplode;
        public DamageDef damageType;
        public int damageAmount = -1;
        public float radius;
        public int ticksToRecheck;        public float explosionForce = 5.9f;
        public DamageDef damageDef = null;These are all comp classes, so you just add it in XML in the <comps> tag of the hediff you want to have this behaviour. For example, this is the hediff added by the "Chemfuel nodules" gene in Alpha Genes
<comps>
	<li Class="VEF.AnimalBehaviours.HediffCompProperties_Exploder">
		<explosionForce>2</explosionForce>
		<damageDef>Flame</damageDef>
	</li>
</comps>