Project Zomboid

Project Zomboid

Not enough ratings
Animal Mechanics - Deeper Dive (42.10)
By Plasmasnack
Animals are more complex than they appear, in typical Zomboid fashion. This aims to help you understand how animals operate, from my analysis of actual game code and in game experience and experimentation. This is more of an information dump than a tutorial.
   
Award
Favorite
Favorited
Unfavorite
Genetic Disorders
These are all in the game and fully functional.
_____________________________________________

dieatbirth
If the baby obtains this at birth it will die.

poorfertility, fertile, sterile
All animals have a fertility value. The presence of any of these disorders completely overrides it. “Poor” is a minuscule chance to successfully breed. Fertile is ALWAYS, sterile is NEVER. Keep in mind that both animals involved have to pass an individual breeding check.

noeggs, nowool, nomilk
Will never produce the relevant resource.

poorwool, poormilk
~80% less generation of the relevant resource.

dwarf
Reduces life expectancy. Reduces min/max size.

poorlife
Reduces life expectancy more than dwarf.

skinny
Reduces min/max weight.

gluttonous, highthirst
Insanely increases the gain of hunger/thirst.

highstress
Insanely increases stress gained.

smalleggs
Insanely reduces produced egg size, which ultimately means tiny hunger values on their eggs.

fidget
Will wander in a huge radius compared to normal. Stacks multiplicative with rain, so when it’s raining they can walk to different states.

craven
Cowardly. In effect, the animal is almost guaranteed to flee when spotting a player.
Genes
You can consider these stats. Babies inherit from parents, I am unsure of how strongly. Breeds also influence genes.

These are kinda intangible to the player. It’s hard to identify in game the genes and disorders of animals. Because it is not widespread knowledge (hopefully this post helps out) most people tend to think the game is bugged. Your animal buddy may have bad heredity or a disorder and you don’t know about it. Or the reverse that your animal has super genes and spits out resources.

_____________________________________________

ageToGrow
How long it takes to grow into a new stage. Like a baby into a juvenile.

strength
Damage dealt when thumping objects and attacking players/animals.

fertility
Chance of pregnancy from breeding attempts, both the male and female value matter.

meatRatio
Weight to meat ratio. Relevant for butchering yield.

eggSize

eggClutch
Quantity of eggs laid.

resistance
Modifies the amount of health loss from any source.

maxMilk / milkInc
maxMilk is the upper limit to the amount of milk that can be stored in the udder. An animal will not naturally be able to hit the limit. Milk generation/capacity increases with milking, and to a smaller extent when babies feed from them. It slows, stops, and degenerates over time without milking. Milk generation first starts when the female is pregnant and will at least always remain without human intervention until the baby grows to not feed from their mother. Consistent milking will eventually peak maxMilk and prolong milk generation. When milk stored in the udder is close to maxMilk (85%-100%) and the animal is not milked, it will take health damage. Realism.

maxWool / woolInc
Nowhere near as complex of a system as milk. Not yet anyway, might be a future addition.

hungerResistance / thirstResistance
Speed that hunger/thirst degradates.

lifeExpectancy
A set amount of days, the animal’s growth stage is irrelevant. Once the animal lives to about 95% of this value it will be considered “old” and will begin dying of age. Death is not instant, it’s just a constant health loss which you may be able to counteract.

minSize / maxSize
The min/max size the animal grows to. Funnily affects chances to poop.

minWeight / maxWeight
Selective Breeding?
Selective breeding is supposed to be a mechanic. Very few of you will play worlds long enough and in such a way to care about it. You could play around with sandbox settings to be able to experience it somewhat. You might be able to, with some degree of accuracy, surmise genes of animals given enough time to study and document your experiences with them.

Just know that animal stats are a thing and can vary widely, and that you'll get lucky or unlucky.

There is a LOT of complex code involving genes/disorders/alleles, and because of that honestly I am unsure of most of its inner workings especially regarding breeding. Here is what I do know:

  • It is based on and tries to mimic real life mechanics.
  • There are calculations to determine how genes and disorders are passed onto offspring.
  • Some alleles are considered dominant.
  • Everything mutates to some degree, often small positive/negative, to offspring.
  • A genetic disorder has a chance to spawn no matter what, but also there is another chance to delete it or existing one(s).
Stress
Similarly to players, stress gain is gradually reduced over the months as they survive. Stress is quite a hefty negative aspect so please take care of the poor animals! It reduces their production, can get them killed, can break objects, and poses a threat to you.

Adding Stress:
  • Zombies nearby.
  • Dehydration or starvation. Which is over 80% hunger/thirst.
  • If it’s raining in any amount (drizzle or storm) and they are standing out in it. Animals have a wacky code way of essentially increasing the odds of the animal finding shelter and when they do, remaining there, but depending on enclosure size you may have to guide them to it. They can be dumb.
  • If it watches you run/sprint. This generates little, don’t worry much about it when it's otherwise a stress free environment.
  • In a moving vehicle going over 5 km/h, which really is any speed. Happens in an animal trailer and it also counts if you are holding an animal while in a moving vehicle.
  • If the animal is set to stress above ground, it will. Specifically means above the ground level: 2nd floor and above. Animals can wander up stairs on their own which will then cause stress from this.
  • Chickens gain stress if not in a hutch during the time period they are supposed to be. Please note that outside of this (daytime) they are unaffected. Unsure if an animal trailer counts as a hutch.

Reducing Stress:
  • Time: just leaving an animal in a stress free environment for a day does wonders.
  • Holding.
  • Petting (has cooldown)

Remember that stress gain is modified by their stress gene and relevant disorders. You definitely could get an animal with such stats that they get stressed very quickly.

Stressed out (80+ stress) males or big animals are dangerous. Let me tell you there is code that marks you as an enemy and they will constantly attack you. Once you are marked they are persistent and will try to kill you. Sometimes the fleeing behavior can override it. Once the behavior gets stopped, they will not want your demise until the rng stress-based behavior hits unlucky for you again. You can stop the behavior by dying.

That’s not a good idea, so here are more ways:
  • Cannot path to you. They can path to you in the ways a zombie can. If they can break something to get to you they will. They can and will climb stairs and break down your bedroom door. Horror movie level stuff.
  • Leave the area or flee yourself. Might be hard, usually animals are faster than you. They don’t turn too well so use that to your advantage. Give it time for stress to decrease, so they won’t want to be aggressive again.
  • Insider (cheese) Knowledge: enter a vehicle.

Basically at a distance once they see you they will want to flee, but if they first spot you and you are too close they will tend to want to attack you. Overall be careful with stressed animals. There can be a stress death spiral loop because stressed animals make more noise and move around a lot, will attract more zombies, fail to find shelter/water, become more stressed, and repeat.
Acceptance
Acceptance hardly does anything. It:
  • At 40+, animals will walk over to you if you shout/whisper and they hear it. Lower acceptance values cause fleeing or aggression. Please know that it is quite dangerous and stupid on your end if you are running and shouting at animals that hardly know you.
  • Reduces odds of fleeing from you.

Mostly a roleplay feature. It may be more gameplay oriented in the future, stress tends to cover things that you may believe would be associated with acceptance instead. The only useful thing I can think of that it allows is to shout and have all your animals come inside, out of the rain.

Animals will not gain acceptance to you over time unless they can see you. Being nearby is not enough, they have to be able to see you. Windows can help if you’d like to gain acceptance while still being in your house. Can choose to read outside with the animals and build acceptance easily and passively.

Increases Acceptance:
  • Holding.
  • Petting (has cooldown).
  • Simply being in their sight.
  • Hand feeding them. NOT filling their troughs or leaving food/drink, you would have to manually feed them.

Acceptance gain is modified by your animal care skill level, and stress or lack thereof.

There is also a “zone acceptance” which I think is a future feature. Seems to be used to validate a zone, but I can totally see them making there be factors in their designated zone that have effects on something later.
Wandering and Fleeing
Animals always wander unless they are in shelter with inclement weather. Within an animal zone, they are supposed to only wander within that zone, but can manage to escape it. Fences eliminate that risk, but remember they can be broken by animals like cows and pigs when stressed. Even non-player built fences, similar to a crawler zombie.

Babies want to follow their mother. Not always, but it is a high priority. Little things can get curious and playful sometimes you know?

Somehow, animals can clip through and wander outside of fully fenced in zones when you are not around. This happens rarely and I am not sure why. If this happens to you, you might think your animal got deleted but it could actually be nearby in the area.

Fleeing is a surprisingly in depth calculation. Though a calm livestock animal without the disorder will essentially never flee from you. Fleeing should only be worried about with stressed animals and wild animals. Craven animals always want to flee. Lured animals cannot flee, either attached to you by rope or lured from food using the lure function.

Distance matters. Movement in vision has a large impact. Running around is not good. Walking is good. Being stationary is the absolute best. Note all of this for when hunting wild animals or trying to wrangle a slightly stressed one.
Wild Animals
Wild animals are more reactive, and will flee easier and flee farther. They have special code where they will automatically die after a period of time if you wound them enough. Versus ordinarily where an animal would die simply to health reaching 0, wild animals have additional features to kill them in a more hunting role play kind of way.

If you are looking to not spook game, walk as much as you can. Being stationary is even better and makes wild animals almost completely ignore you. Though unfortunately there are many reasons why the car is weapon of choice for hunting, it's just how the game functionally works and is designed to be extremely difficult to hunt in the intended way. Trees hide animals and your characters are terribly bad at aiming at longer ranges. The most creative you can be is lay down some water/food and be extremely patient until something takes the "bait" and make the shot.

If you are looking to tame something like Spiffo, all ways of increasing/reducing stress/acceptance apply to all animals. Be slow, offer food, try to pet, try not to stress them out, get them a nice animal zone and you may be successful in taming.

FYI livestock animals without a designated zone are somewhat wild. They will resemble a lot of effects and behavior of wild animals but to a lesser degree. They are not as skittish towards humans, but of course pay attention to how stressed they are.
Sounds
For the most part animals just flee from hearing sounds. They ignore sounds from radios, tv, and from vehicles. Those cases are explicitly ignored but many sounds they simply can never hear in the first place.

It's best to think of sound only mattering when you are the source of it. Whether it's a gun shot, shout, footstep, whatever. The radius of the sound influences how far away the animal can flee from it.

Though it's referred to as "attractiveness", the only case where an animal wants to go to the sound is when the player calls out and is accepted. We are not yet at a level of depth where a male cow will hear a female and want to go towards the sound. I can see some future expansions here, may be cool to be able to lure animals with sound.
Food & Water
Species need different amounts of food and water. Cows need the most, and chickens, rabbits, rats require very little.

Wooden Troughs

Most popular and widely used to put the food and water for your animals. Animals will only ever eat and drink when they need to and are never overindulgent. Troughs can be picked up and moved from existing areas or made yourself with level 1 carpentry. Also used as a low level rain collector for players. It is very useful thing. Troughs have a metal variant which is less useful overall.

A trough can only have either food or water in it, not both simultaneously. Unfortunately they are not often stable objects and may take multiple placements to get it to register properly. Sometimes random food gets spawned (from God?) into troughs. Just unstable things.

Animal Trailers can be eaten from by animals inside of it.
______________________________

Food

Currently all animals can eat grass, and grass is by far the easiest food source. They can also eat hay, animal feed, and most of what a player can eat as long as it isn't rotten. I imagine eventually different animals will eat different foods.

Grass can be obtained by "Removing Grass" by hand, but in lowish quantity. Using a hand scythe and "Mowing" gives you more. A full scythe mows in a 3x3 area and is the best way to get grass. Mowed and eaten grass will grow back and is modifiable in sandbox settings, it has a special depleted tile.

Food is very easy to handle for animals since they can eat from grass tiles itself. In a lot of cases you don't need to even think about food for them.

______________________________

Water

Both pure and tainted water are the same. Animals drink either. They can drink from water tiles and puddles of water after it rains. They can drink from any open container: anything that can collect rainwater: bucket, paint can, frying pan, etc.
Extinction?
After some point in time in your world, all spawned farm animals in newly generated zones will be freshly dead corpses. Wild animals are not affected by this. Does this mean that farm animals go extinct without your intervention after 6-12 months? Nope!

Animals spawned in an animal trailer will always be alive regardless of world time. You can also find small groups rarely on the roads regardless of world time. The group spawning is a vehicle story event, which is why they spawn only on the roads and are affected by the sandbox setting. The trailer can spawn as a crashed vehicle story event anywhere or as a parked vehicle at certain locations like farms.
Miscellaneous Info
  • Shelter is not really a concept. They only care if there is a roof on a tile when they are looking for shelter.
  • Eating source priority = ground items > trough > mother > grass tile.
  • Age does have impacts, like affecting how much they produce.
  • Adding food to a trough causes all animals in the zone to turn to look at it for some reason.
  • Males will attack males of the same species if it’s breeding season and both are in the correct age range. They have to be in the same animal zone, it’s NOT vision/detection based. So you can easily separate them to prevent fighting.
  • All species can co-mingle and exist together in harmony. There is no such mechanic like a cow accidentally trampling a chicken.
  • The size of an enclosure (animal zone) affects animal growth. Smaller zones = smaller animals.
  • Speaking of enclosures, animals do not care if their entire zone is grass or pavement or man made.
5 Comments
Sama 4 hours ago 
Incredible amount of info. Thanks for the work lad!
Plasmasnack  [author] 16 Jul @ 4:57am 
@RipVanWinkle
After a certain point of time in the world, all spawned farmed animals in the manually painted animal zones by the developers should immediately die. They will be fresh corpses. In my play testing I saw small groups of "wild" farm animals spawning on the roads (so not in animal zones) after 12 months world time. Animal trailers can spawn with live animals in them regardless of time.

The answer to the question is that they spawn at the same rate in the dev painted animal zones, but are killed when the player first generates the area. Farm animals will not be extinct without your intervention but their numbers will be low. You can still find them in trailers and sometimes wandering near roads. I haven't explored what happens to the animals if you leave an already generated zone "virtualized" (meaning it's not within the players active radius) for over a year.
RipVanWinkle 15 Jul @ 5:34pm 
Thank you for all finding and gathering all this info together :D! There is one more area I was curious about, though, and thought you might know more on: how the game treats animals when the player isn't around.

I love building huge ranches in my games, but often become anxious about gathering as many animals as I can from other farms before neglect starts to kill them off. I've seen it before - animal zones littered with corpses by the end of the first winter. But is that always the case? Like, does the game just start making pre-existing animal zones spawn with fewer and fewer alive animals over time? Will any livestock animals spawn wild after that point, or are they essentially gone from the world if you didn't save a couple?

I know that's a lot, and I got no idea if you've looked into it. But the wiki doesn't have many answers, and you seem to know animal mechanics better than most.
Toon 15 Jul @ 2:30pm 
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩Help
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩Project
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩Zomboid
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩Take
🟩🟩⬛⬛⬜⬜🟩🟩⬛⬛⬜⬜Over
🟩🟩⬛⬛⬜⬜🟩🟩⬛⬛⬜⬜Steam
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩Copy
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩&
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩Paste
🟩🟩⬛⬛⬛⬛⬛⬛⬛⬛🟩🟩DO
🟩🟩⬛⬛⬛⬛⬛⬛⬛⬛🟩🟩IT
🟩🟩🟩⬛⬛⬛⬛⬛⬛🟩🟩🟩NOW
🟩🟩🟩⬛⬛⬛⬛⬛⬛🟩🟩🟩
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩
🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

sorry
Collette 13 Jul @ 1:14am 
Excellent :). Thank you! I did not know there was so much to learn about my babys!