Skip to content

Auto Nutrition

juanosarg edited this page May 24, 2021 · 1 revision

CompAutoNutrition is a comp class that makes an animal eat automatically without consuming anything visible to the player (ants, air, etc)

    //A comp class that makes the animal stop when it's hungry and eat a source of food that the player doesn't see
    //Example: ants, or air

    public int tickInterval = 250;
    public string consumingFoodReportString = "Eating food";

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 would allow an animal to eat ants, and check for hunger only every 2000 ticks

<comps>
	<li Class="AnimalBehaviours.CompProperties_AutoNutrition">
		<tickInterval>2000</tickInterval>
                <consumingFoodReportString>Eating ants</consumingFoodReportString>		
	</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