Animal Behaviours Comp Classes - AndroidQuazar/VanillaExpandedFramework GitHub Wiki
The AnimalBehaviours module of the framework has A LOT of comp classes that can be added to any animal to provide special behaviours:
- Acid Attacks and Acid Immunity: A type of attack that causes damage over time, as well as a comp class to make animals immune to it.
- Animal Resources: An alternative to Milkable and Shearable, to allow animals to produce things that aren't milk or wood. Customizable to produce a random item, as well as to sometimes produce additional items.
- Animal Resources On Caravan: Allows the animal to produce resources while being on a caravan, independently of what they produce on the map, and without need for pawn work (shearing, milking, etc).
- Apply Hediff When Bound: When a creature develops a bond with a colonist, apply a hediff to the creature. Optionally, do a Job if the bonded pawn dies.
- Asexual Reproduction: Animals that reproduce by either sporulation, strobilation or partition.
- Auto Nutrition: Makes an animal eat automatically without consuming anything visible to the player (ants, air, etc)
- Blink: Animal changes position uncontrollably every X ticks. This behaviour only happens when the animal is iddle.
- Build Periodically: Allows an animal to periodically create a building
- Cause Incident: Periodically triggers an ingame incident (eclipse, aurora, etc)
- Change Def if Not Unique: Swaps the animal for a different one if it is not the only existing one in the map
- Change Weather: Animal changes the map's weather when spawned
- Corpse Decayer: Makes an animal detect nearby corpses and increase its hunger meter by decaying them, rotting them in the process
- Destroy This Item: Can be used to allow the player to get rid of unwanted animal products that aren't otherwise easy to get rid of
- Die After Period: Kills an animal after a configurable time
- Die And Change Into Another Def: A gizmo that the player can use if the creature is tamed that destroys the animal and spawns a different thing in the same position
- Dig Periodically: Allows an animal to dig in the ground for a given resource
- Dig When Hungry: Allows an animal to dig in the ground for a given resource, but only when hungry
- Disease Event Immunity: Makes an animal not be affected by the animal disease event
- Disease Immunity: Makes an animal recover from specified diseases
- Diseases After Period: After a set amount, the animal will begin to acquire hediffs
- Doesn't flee: Makes an animal not flee from combat when fired upon
- Draftability: Makes an animal draftable like any other colonist. They can be forced to move and attack
- Drop on Death: Makes an animal drop resources immediately when killed
- Eat Weird Food: Makes animals have any dietary needs you choose
- Electrified: Makes creatures recharge batteries nearby
- Enrage Other Pawns: Causes other animals to go manhunter when it does
- Exploding Hatcher: Makes an egg item explode when hatching
- Extreme Xenophobia: Makes a colonist attack any other colonist that isn't from a given list of pawnkinddefs (useful only if you have different races by using Humanoid Alien Races)
- Fertilizer: Makes animal change floor terrain when it passes through
- Filth Producer: Makes animal spawn filth around it (WARNING, may be laggy if used constantly)
- Fixed Gender: Makes animal always spawn with a given gender
- Floating: Makes animal ignore terrain movement costs
- Gas Producer: Makes an animal spawn a cloud of gas around it.WARNING: this is a laggy class, since gasses in RimWorld are laggy. Use sparingly
- Give Thoughts On Caravan: Makes the animal provide mood buffs and debuffs to caravan members while caravaning
- Graphic by Style: Changes the graphic of an animal depending on the styles present in the main colony's ideoligion
- Graphic by Terrain: Makes an animal change its graphic to a different one when it steps on some terrains
- Hediff Effecter: Makes the animal cause a health condition (hediff) on nearby pawns
- Hediff When Fleeing: Applies a health condition (hediff) when the creature starts fleeing from an attacker
- Highly Flammable: Makes the animal take extra damage from fire
- Infecter: Makes the animal's attacks cause extra infections
- Initial Ability: Makes the animal always spawn with an initial ability
- Initial Hediff: Makes the animal always spawn with an initial health condition (hediff)
- Initial Mental State: Makes the animal always spawn with an initial mental state
- Last Stand: Makes animals scale their melee cooldowns the more damaged they are
- Light Sustenance: Makes the animal require light to live
- Metamorphosis: Makes the animal change into a different animal after a given time
- Mind Effecter: Makes the animal cause a mental state on nearby pawns
- Nearby Effecter: Makes the animal affect nearby Things and turn them into other Things
- No Taming Decay: Makes the animal keep their taming and training forever, independently of their wildness
- Passive Regenerator: Makes the animal regenerate wounds on nearby pawns
- Pawn Overlay: Draws overlays on the animal's sprite, allowing for very VERY low lag animations and effects
- Produces no filth: Makes the animal produce and spread no filth
- Refueling: Makes an animal refuel nearby specified buildings
- Regeneration: Makes the animal regenerate its own health
- State After Health Loss: Makes the animal get a given mind state after losing a given amount of health
- Summon On Spawn: Summons other animals when this animal is spawned on a map
- Swallow Whole: Makes animal capable of swallowing other animals or colonists whole, and digesting them after its stomach is full
- Thought Effecter: Makes the animal cause a thought on nearby pawns
- Untameable: Makes this animal untameable, and either go wild if tamed, or manhunter
They are all comp classes, so you just add them in XML in the <comps>
tag. Check any of the examples to see.