Jump to content

World is littered with empty beefaloherds (caused by rollbacks, maybe?)

  • Pending

See thread linked below.

TL;DR version: long-running world has lots of beefaloherd entities with no members (components.herd.membercount = 0). In the attached save, out of 123 herds, 89 are empty.

The snapshots in the attached cluster were, going by the timestamps and server log date, all played in 1 session - however, there are several instances where the cluster was rolled back (timestamp delta between snapshots >  8 minutes), and this is exactly where the number of empty herds increased. I use this "production" cluster for fight training as well, so it has seen a lot of rollbacks over the years.




Steps to Reproduce

User Feedback


Thank you very much for the world. I have been tinkering with it. It allowed me to see:



Unfortunately, those bugs are the cause of beefalo overpopulation, not the cause for the empty beefaloherds growing.

Upon closer inspection of the empty beefaloherds, you can rest assured they do nothing, because they can only spawn a baby beefalo when there's a parent to attach it (which must be a member of the herd).

I found half of the cause of the empty beefaloherds. There are special beefalo in your world that have no herd (herd in herdmember component is set to nil), BUT have a herd location saved on the knownlocations component. So basically, every time you log out and log in, more herds appear, because it creates one for itself (it doesn't have one) but it doesn't join it (it fails because it remembers it has one). Also, because of the fail everytime (and how the code works), it creates 3 new empty herds each time.

As for why exactly some beefalo could have herd set to nil, but have a herd knownlocation memorized: it's a mystery to me. Technically, this in particular, should be impossible. But I don't know if you may have used any console commands that caused this, or mods that might have interfered, or maybe the bug comes from older versions.

Another tidbit, is that the beefalo also remembered a "loiteranchor" knownlocation, which means it was fed or was ridden (presumably to domesticate it). When I pulled all the herdless beefalo to me, I got 2. One that was feral. And one that was domesticated. Both with loiteranchor and herd locations, and both without herd assigned in herdmember.

Here are some commands to repair the world:

-- 1) clean buggy beef
for k, v in pairs(Ents) do if v.prefab == "beefalo" and v.components.herdmember.herd == nil then v:Remove() end end

-- 2) clean empty herds
for k, v in pairs(Ents) do if v.prefab == "beefaloherd" and v.components.herd.membercount == 0 then v:Remove() end end

-- extra) pull buggy beef for inspection
for k, v in pairs(Ents) do if v.prefab == "beefalo" and v.components.herdmember.herd == nil then v.Transform:SetPosition(ThePlayer.Transform:GetWorldPosition()) end end

Here is a command to spawn a domesticated beef:

c_spawn("beefalo"); c_sel().components.hunger:DoDelta(400); c_sel().components.domesticatable:DeltaDomestication(1); c_sel().components.domesticatable:TryBecomeDomesticated();

After that, no more herd spawning on log in. Of course, you still have a massive population to clean. You can kill them all and spawn a lone beefalo every 10 seconds to make herds of size 1 wherever you please. Overpopulation still has to be fixed, of course.

  • Thanks 1

Share this comment

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...