Why don't animals eat bushes in the winter?

Started by YokoZar, May 27, 2019, 10:30:29 PM

Previous topic - Next topic

YokoZar

In sufficiently cold biomes, fully grown and mature plants seem to be inedible when it's cold enough outside.  Wild animals will wander around until they get malnutrition, then leave the map.  Tamed herbivores will ignore them entirely until it warms up.

It seems like there's a threshold temperature that triggers "don't allow this plant to be eaten" mode.  Or maybe it's whether or not there's snow on the ground of the plant.  Does anyone know how the logic works here?

Razuhl

Both can apply.

Temperature is used for caravans when checking if a world tile can be grazed at. For that it's temperature must be higher or equal to 0(also there have to be "virtual" plants in the biome).

For grazing on the local map leafless trees can not be eaten and plants whose "hideAtSnowDepth" is exceeded by the snow in their tile. Most (vanilla) wild plants have it set to 50% snow, except cacti which require 100% snow.

YokoZar

Quote from: Razuhl on May 28, 2019, 01:27:30 AM
Both can apply.

Temperature is used for caravans when checking if a world tile can be grazed at. For that it's temperature must be higher or equal to 0(also there have to be "virtual" plants in the biome).

For grazing on the local map leafless trees can not be eaten and plants whose "hideAtSnowDepth" is exceeded by the snow in their tile. Most (vanilla) wild plants have it set to 50% snow, except cacti which require 100% snow.
Is the plant still visible when the hideAtSnowDepth threshold is exceeded?

Can bushes/brambles go leafless?

Razuhl

When the hideAtSnowDepth threshold is exceeded they are no longer visible.

I actually misstated that. Trees can be eaten even if leafless but leafless plants can not. And any plant can be leafless, they usually change texture. Like brown bushes can not be eaten, green bushes can.

YokoZar

Quote from: Razuhl on May 28, 2019, 02:26:10 AM
When the hideAtSnowDepth threshold is exceeded they are no longer visible.

I actually misstated that. Trees can be eaten even if leafless but leafless plants can not. And any plant can be leafless, they usually change texture. Like brown bushes can not be eaten, green bushes can.
Ahh thank you, this answers everything!