Give Thoughts On Caravan - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki

<- Back

CompGiveThoughtsOnCaravan makes an animal create buffs and debuffs on the human members of a caravan

        //CompGiveThoughtsOnCaravan scans the pawn list of a caravan this animal is a part of, 
        //and confers "thought" on each of them. A "negativeThought" can be configured to be created at random

        public int intervalTicks = 30000;
        public ThoughtDef thought;
        public bool causeNegativeAtRandom = false;
        public float randomNegativeChance = 0.1f;
        public ThoughtDef negativeThought;

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 the Hurseman in Vanilla Genetics Expanded to affect caravans:

<comps>
	<li Class="VEF.AnimalBehaviours.CompProperties_GiveThoughtsOnCaravan">
		<intervalTicks>10000</intervalTicks>
		<thought>GR_EngagedByHumanoidMood</thought>
		<causeNegativeAtRandom>true</causeNegativeAtRandom>
		<randomNegativeChance>0.1</randomNegativeChance>
		<negativeThought>GR_InsultedByHumanoidMood</negativeThought>
	</li>
</comps>
⚠️ **GitHub.com Fallback** ⚠️