DeathActionWorker_ConfigurableExplosion - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
DeathActionProperties_ConfigurableExplosion is like the base game explosion death action worker (think Boomalopes) but configurable:
public float babyExplosionRadius = 1.9f;
public float juvenileExplosionRadius = 2.9f;
public float adultExplosionRadius = 4.9f;
public DamageDef damageDef;
public int damAmount = -1;
public int armorPenetration = 0;
public SoundDef explosionSound = null;
Under the race tag of the ThingDef of an animal, you add:
<deathAction Class="AnimalBehaviours.DeathActionProperties_ConfigurableExplosion">
<workerClass>AnimalBehaviours.DeathActionWorker_ConfigurableExplosion</workerClass>
<babyExplosionRadius>4.9</babyExplosionRadius>
<juvenileExplosionRadius>6.9</juvenileExplosionRadius>
<adultExplosionRadius>9.9</adultExplosionRadius>
<damageDef>Flame</damageDef>
</deathAction>
That is the code present in VFE - Insectoids 2 Titantick, to give him a big explosion on death