Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Initial Hediff

juanosarg edited this page Apr 28, 2021 · 3 revisions

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>

VFE Core

General Comp classes

General DefModExtensions

Item Processor

PipeSystem

Custom Structure Generation

Multi Verb Combat Framework - MVCF

Animal Behaviours

Apparel

Cuisine

Furniture

Plants

Clone this wiki locally