-- babybeefalo.lua local function SetFullyGrown(inst) local grown = SpawnPrefab("beefalo") grown.Transform:SetPosition(inst.Transform:GetWorldPosition() ) grown.Transform:SetRotation(inst.Transform:GetRotation() ) grown.sg:GoToState("grow_up_pop") inst:Remove() end -- herd.lua self.task = self.inst:DoPeriodicTask(math.random() * 2 + 6, _OnUpdate, nil, self) -- herdmember.lua self.task = self.inst:DoTaskInTime(5, OnInit)
Assuming that herds never merge, consider the following situation:
You have a herd of 1 beefalo, 1 baby beefalo spawns. The baby beefalo is added to the herd. Now you have a herd of 2.
The baby beefalo grows until he's fully grown. He gets removed from the herd. Now you got a herd of 1.
A beefalo spawns on the baby place. But it isn't linked to the herd. What happens next?
The beefalo in 5 seconds will get a herd, if it doesn't have one.
Either the herd picks up the beefalo via GatherNearbyMembers, or the beefalo makes its own.
If the beefalo makes its own, since herds don't merge, you will end up with a herd of 1 and another herd of 1, and both will grow.
And the same might happen to them.
This causes beefalo overpopulation.
NOTE: This applies to single player Don't Starve as well; I will mention it next patch time comes.
Have a world running long enough for chance to happen.