Initial Hediff - AndroidQuazar/VanillaExpandedFramework GitHub Wiki

CompInitialHediff is a comp class that makes an animal always spawn with a given health condition (hediff). This is only checked once at spawn.

    //A comp class that makes animals always spawn with an initial Hediff

    public string hediffname = "";
    public float hediffseverity = 0f;      

    //This can be set to apply the hediff to a given body part

    public bool applyToAGivenBodypart = false;
    public BodyPartDef part = null;

    //Possibility to add random hediffs

    public bool addRandomHediffs = false;
    public int numberOfHediffs = 1;

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 allows Hym in RimWorld - Witcher Monster Hunt to have a hediff reducing their pain sensitivity to 0

<comps>
	<li Class="AnimalBehaviours.CompProperties_InitialHediff">
		<hediffname>WMH_NoPain</hediffname>
		<hediffseverity>1</hediffseverity>
	</li>
</comps>
⚠️ **GitHub.com Fallback** ⚠️