Skip to content

Apply Hediff When Bound

juanosarg edited this page Sep 8, 2022 · 2 revisions

When a creature develops a bond with a colonist, CompApplyHediffWhenBound applies a hediff to the creature. Optionally, makes the animal do a Job if the bonded pawn dies.

    public int checkingInterval = 1000;
    public HediffDef hediffToApply;
    public bool applyHediffToBonded = false;
    public HediffDef hediffToApplyToBonded;
    public bool doJobIfBondedDies = false;
    public JobDef jobToDoIfBondedDies;
    public bool dieIfBondedDies = false;

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag. For example, this makes the Wyrm in Vanilla Animals Expanded - Caves stronger when bound, but makes it leave the map if the bonded pawn dies:

<comps>
	<li Class="AnimalBehaviours.CompProperties_ApplyHediffWhenBound">
		<hediffToApply>VAE_StrengthenedByBond</hediffToApply>
		<doJobIfBondedDies>true</doJobIfBondedDies>
		<jobToDoIfBondedDies>VAECaves_LeaveMap</jobToDoIfBondedDies>				
	</li>
</comps>

VFE Core

General Comp classes

General DefModExtensions

Item Processor

PipeSystem

Custom Structure Generation

Multi Verb Combat Framework - MVCF

Animal Behaviours

Genes

Apparel

Cuisine

Furniture

Plants

Deprecated

Clone this wiki locally