-
Notifications
You must be signed in to change notification settings - Fork 37
Eat Weird Food
juanosarg edited this page Aug 8, 2021
·
2 revisions
CompEatWeirdFood forks the whole vanilla animal eating classes so the animal can eat whatever you choose.
//Makes the animal have customizable eating habits
//A list of defNames the animal can eat. Note that they can not exist, making it possible for you
//to add items from mods, and if the mod isn't there, the creature will just ignore it
public List<string> customThingToEat = null;
//Nutrition gained when eaten (overrides item's nutrition if it has one)
public int nutrition = 2;
//If set to true, it will destroy item after one feeding. If not, it will damage it
public bool fullyDestroyThing = false;
public float percentageOfDestruction = 0.1f;
//If no items are present, the animal can dig for them
public bool digThingIfMapEmpty = false;
public string thingToDigIfMapEmpty = "";
public int customAmountToDig = 1;
//Receive a hediff after eating
public string hediffWhenEaten = "";
//Advance life stages (change to a different animal def) after eating
public bool advanceLifeStage = false;
public int advanceAfterXFeedings = 1;
public string defToAdvanceTo = "";
public bool fissionAfterXFeedings = false;
public string defToFissionTo = "";
public int numberOfOffspring = 2;
public bool fissionOnlyIfTamed = true;
//Instead of eating a battery, drain its power
public bool drainBattery = false;
public float percentageDrain = 0.1f;
//If food is a plant, receive nutrition according to growth
public bool areFoodSourcesPlants = false;
//This is just for No Water No Life compatibility
public bool needsWater = true;
Important: you need to set the animals tag to VEF_AnimalWeirdEater, otherwise all this won't work AT ALL.
It is a comp class, so you just add it in XML in the <comps>
tag. For example, this allows the Angel Moth in Alpha Animals to eat clothes (including vanilla clothing and Vanilla Apparel Expanded) and if none are found, eat grass and tall grass.
<comps>
<li Class="AnimalBehaviours.CompProperties_EatWeirdFood">
<customThingToEat>
<li>Apparel_TribalA</li>
<li>Apparel_Parka</li>
<li>Apparel_Pants</li>
<li>Apparel_BasicShirt</li>
<li>Apparel_CollarShirt</li>
<li>Apparel_Duster</li>
<li>Apparel_Jacket</li>
<li>Apparel_CowboyHat</li>
<li>Apparel_BowlerHat</li>
<li>Apparel_Tuque</li>
<li>Apparel_WarVeil</li>
<li>VAE_Footwear_Boots</li>
<li>VAE_Footwear_Shoes</li>
<li>VAE_Handwear_Gloves</li>
<li>VAE_Apparel_CasualTShirt</li>
<li>VAE_Apparel_Hoodie</li>
<li>VAE_Apparel_Shorts</li>
<li>VAE_Apparel_Skirt</li>
<li>VAE_Apparel_ShirtandTie</li>
<li>VAE_Apparel_SuitJacket</li>
<li>VAE_Apparel_Trousers</li>
<li>VAE_Headgear_Fedora</li>
<li>VAE_Apparel_Overalls</li>
<li>VAE_Apparel_FleeceShirt</li>
<li>VAE_Apparel_Jeans</li>
<li>VAE_Apparel_ChefsUniform</li>
<li>VAE_Apparel_MilitaryJacket</li>
<li>VAE_Apparel_MilitaryUniform</li>
<li>VAE_Apparel_BuildersJacket</li>
<li>VAE_Apparel_DoctorScrubs</li>
<li>VAE_Apparel_LabCoat</li>
<li>VAE_Apparel_TankTop</li>
<li>VAE_Apparel_SheriffShirt</li>
<li>VAE_Apparel_Jumpsuit</li>
<li>VAE_Apparel_Tunic</li>
<li>VAE_Apparel_Blouse</li>
<li>VAE_Apparel_Apron</li>
<li>VAE_Apparel_Cape</li>
<li>VAE_Headgear_TrapperHat</li>
<li>VAE_Headgear_SummerHat</li>
<li>VAE_Apparel_PeltCoat</li>
<li>VAE_Apparel_TribalPoncho</li>
<li>VAE_Apparel_TribalKilt</li>
<li>VAE_Headgear_Hood</li>
<li>VAE_Headgear_Scarf</li>
<li>VAE_Headgear_Beret</li>
<li>VAE_Headgear_BaseballCap</li>
<li>VAE_Headgear_ChefsToque</li>
<li>Plant_Grass</li>
<li>Plant_TallGrass</li>
</customThingToEat>
<nutrition>1</nutrition>
<digThingIfMapEmpty>false</digThingIfMapEmpty>
<fullyDestroyThing>false</fullyDestroyThing>
<percentageOfDestruction>0.5</percentageOfDestruction>
<needsWater>true</needsWater>
</li>
</comps>
- QuestNode_GetFaction
- Expandable projectiles
- Faction Def Extension
- Toggable patches
- Recipes Inheritance
- Adding new backstories
- Spawning things on new generated maps
- ThoughtExtensions
- WeatherLetterExtensions
- WeatherOverlayExtension
- WeatherEffectsExtension
- ThingDefExtension
- Stuff commonality extension
- Biome extension
- PipeSystem basics
- Resource
- Resource storage
- Resource processor
- Resource to thing
- Resource to power
- Thing to resource
- Resource trader
- Refill building with pipes
- Pipe valve
- Update to KCSG 2.0
- Exporting buildings
- Customizing symbols
- Debug helpers options
- Custom faction settlement
- Custom structure and scenarios
- Custom structure in quests
- Custom structure in WorldObjects
- Biome based structures
- Spawning world object(s) at world generation
- Prevent settlement spawning for nomadic factions
- Animal Behaviours Basics
-
Animal Behaviours Comp Classes
- Acid Attacks and Acid Immunity
- Animal Resources
- Animal Resources On Caravan
- Apply Hediff When Bound
- Asexual Reproduction
- Auto Nutrition
- Blink
- Build Periodically
- Cause Incident
- Change Def if Not Unique
- Change Weather
- Corpse Decayer
- Destroy This Item
- Die After Period
- Die And Change Into Another Def
- Dig Periodically
- Dig When Hungry
- Disease Event Immunity
- Disease Immunity
- Diseases After Period
- Doesn't flee
- Draftability
- Drop on Death
- Eat Weird Food
- Electrified
- Enrage Other Pawns
- Exploding Hatcher
- Extreme Xenophobia
- Fertilizer
- Filth Producer
- Fixed Gender
- Floating
- Gas Producer
- Give Thoughts On Caravan
- Graphic by Style
- Graphic by Terrain
- Hediff Effecter
- Hediff When Fleeing
- Highly Flammable
- Infecter
- Initial Ability
- Initial Hediff
- Initial Mental State
- Last Stand
- Light Sustenance
- Metamorphosis
- Mind Effecter
- Nearby Effecter
- No Taming Decay
- Passive Regenerator
- Pawn Overlay
- Produces no filth
- Refueling
- Regeneration
- State After Health Loss
- Summon On Spawn
- Swallow Whole
- Thought Effecter
- Untameable
- Animal Behaviours Hediff Comp Classes
- Animal Behaviours Damage Workers
- Animal Behaviours Def Extensions
- Animal Behaviours Extra Defs
- Animal Behaviours Misc