Die After Period - AndroidQuazar/VanillaExpandedFramework GitHub Wiki
CompDieAfterPeriod is a comp class that is added to an animal and creates a counter that kills the animal when it reaches a configurable amount. This method has the advantage of making animals that actually DIE when you want, since the game just makes them accumulate diseases but doesn't kill them of old age.
//A pretty simple comp class that will kill the animal after timeToDieInTicks ticks.
//"effect" is just an effectFilth splash around the animal, and a hive spawn sound being played
public int timeToDieInTicks = 1000;
public bool justVanish = false;
public bool effect = false;
public string effectFilth = "Filth_Blood";
It is a comp class, so you just add it in XML in the <comps>
tag of the animal you want to die after timeToDieInTicks. For example, this kills the Vat-Grown Monstrosity in Vanilla Factions Expanded - Insectoids:
<comps>
<li Class="AnimalBehaviours.CompProperties_DieAfterPeriod">
<timeToDieInTicks>5000</timeToDieInTicks>
<effect>true</effect>
<effectFilth>Filth_BloodInsect</effectFilth>
</li>
</comps>