Skip to content

Corpse Decayer

juanosarg edited this page Jan 25, 2021 · 1 revision

CompCorpseDecayer makes an animal detect nearby corpses and increase its hunger meter by decaying them, rotting them in the process

    //A comp class to make a creature feed on nearby corpses, making it recover its hunger
    //and rotting the corpses

    public int radius = 5;
    public int tickInterval = 500;
    public int decayOnHitPoints = 1;
    public float nutritionGained = 0.2f;
    public string corpseSound = "";

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 Helixien slugs in Alpha Animals to rot corpses and feed on them

<comps>
	<li Class="AnimalBehaviours.CompProperties_CorpseDecayer">
		<radius>5</radius>
		<tickInterval>500</tickInterval>
		<decayOnHitPoints>2</decayOnHitPoints>
		<nutritionGained>0.1</nutritionGained>
		<corpseSound>AA_HelixienCorpseSound</corpseSound>
	</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