Skip to content

DeathActionWorker_SpawnItemsAndFilth

juanosarg edited this page May 29, 2026 · 1 revision

<- Back

DeathActionWorker_SpawnItemsAndFilth is the same as the old CompDropOnDeath we had, but using DeathActionProperties, which didn't exist in the game prior to Anomaly:

        public float dropChance = 1f;
        public bool isRandom = false;
        public List<ThingDefCountClass> items = new List<ThingDefCountClass>();
        public ThingDef filthCreated;
        public IntRange filthCountRange;
        public SoundDef sound;

How do I use this code?

Under the race tag of the ThingDef of an animal, you add:

<deathAction Class="VEF.AnimalBehaviours.DeathActionProperties_SpawnItemsAndFilth">
	<items>
		<InsectJelly>45</InsectJelly>
	</items>
	<filthCreated>Filth_Slime</filthCreated>
	<filthCountRange>5~10</filthCountRange>
	<sound>Hive_Spawn</sound>
</deathAction>

Clone this wiki locally