Skip to content

Spawn pawn on max severity

juanosarg edited this page May 29, 2026 · 1 revision

<- Back

HediffComp_SpawnPawnOnMaxSeverity will spawn a new pawn when the hediff reaches severity of 0.99 or higher, optionally damaging the hediff's pawn

        public List<PawnKindDef> pawnKindOptions = new List<PawnKindDef>();
        public ThingDef filthCreated;
        public IntRange filthCountRange;
        public SoundDef sound;
        public DamageDef damage;
        public FloatRange damageAmount; 

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag of the hediff you want to have this behaviour.

<comps>
	<li Class="VEF.AnimalBehaviours.HediffCompProperties_SpawnPawnOnMaxSeverity">
		<pawnKindOptions>
			<li>VGE_Exoworm</li>
		</pawnKindOptions>
		<filthCreated>Filth_BloodInsect</filthCreated>
		<filthCountRange>2~5</filthCountRange>
		<sound>Hive_Spawn</sound>
		<damage>Cut</damage>
		<damageAmount>4~8</damageAmount>
	</li>
</comps>

Clone this wiki locally