Skip to content

Fertilizer

juanosarg edited this page Aug 8, 2021 · 4 revisions

CompTerrainChanger is a comp class that makes an animal change a terrain permanently when it passes through it. Despite the name, it doesn't need to change fertility, it can change any terrain to another.

Optionally, it can also make this changed terrain change to a third one when the animal passes through it again.

    //Makes the animal change a given terrain to a second one, and then (optionally) 
    //that second one to a third one

    public int checkingRate = 100;

    public string FirstStageTerrain = "";
    public string SecondStageTerrain = "";

    //The animal will need obedience (guard) training to do this third terrain change step
    public bool doThirdStage = false;
    public string ThirdStageTerrain = "";

    //Act in a radius, instead of on the pawn's position
    public bool inRadius = false;
    public int radius = 2;

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 Sand Squid in Alpha Animals to change sand to fertilized sand, and then to superior fertilized sand if it is trained in guard

<comps>		
	<li Class="AnimalBehaviours.CompProperties_TerrainChanger">
		<FirstStageTerrain>Sand</FirstStageTerrain>
		<SecondStageTerrain>AA_FertilizedSand</SecondStageTerrain>
		<ThirdStageTerrain>AA_SuperiorFertilizedSand</ThirdStageTerrain>
        </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