• Content count

  • Joined

  • Last visited

Community Reputation

2,885 Excellent

About DarkXero

  • Rank
    Senior Member


Don't Starve Together
  • Contributor
Oxygen Not Included
  • Alpha Contributor

Recent Profile Visitors

12,251 profile views
  1. I was going to write it but then I realized that I ****** up and I was the one generating the new herds with my debug lines. So yeah, domestication it is. The other way was my fault. My bad for raising hopes. If I figure something out I will post new results.
  2. It's not the only way but it is a valid way. A domesticated beefalo abandons its herd and when it goes feral it creates a new one.
  3. They behave like goats now (kind of). No more exponential growth. No more servers with 40 herds and over 300 beefalo. Or phantom herds. Kill all but one, and lure it with feeding or saddle and ride it to displace the herd. Beefalo herd updates every 8 seconds for members within a 20 units radius (about 3 and a half tiles). Important to not fully domesticate the lone beef, or the herd won't be able to find a feral parent inside the herd to attach the baby. Another way would be the following: 1) Wait until there's baby beefalo. 2) Kill everything but 1 baby beefalo. 3) Relocate the lone baby beefalo with teleportation. When the baby grows, the baby will be deleted. The herd will be empty and removed. The herd will no longer be valid. A new grown beefalo will spawn on its place. Since the herd is no longer valid, a new herd will spawn there. A problem may arise where you teleport the baby, but the beefalo herd was on the mood and spawning babies, so a new baby spawns next to your baby. If your baby grows, the herd will still be valid. Now you will have your grown baby, and the new baby, running against the wall trying to return to the herd that's far away. To avoid this problem you would need to do the herd relocation outside Spring or if they're in the mood. All of this because the herd only updates positions for the members that are nearby. It is truly a conundrum. What's the difference between a herd with a member that's 10 units away from the update range versus a herd with a member that's 50 units away from the update range? Maybe the telelocator staff should make teleported units leave the herd and make their own? But then we could make new herds from a single herd: teleport one goat and one beefalo from a herd to duplicate herds... Would it be balanced to make gigantic meat farms with telelocator staffs and bases? We could also make it so if you have 1 member only, the herd position updates no matter what. This would fix the telelocation issue. But then this means that any herds with 1 single member will wander to zones of the map where they shouldn't be. Beefalo would wander way outside the savannah, since the herd point would keep moving with them. We could also apply the goat treatment: if you have one beefalo, you push it to where you want the herd. -- babybeefalo.lua local function SetFullyGrown(inst) local herd = inst.components.herdmember ~= nil and inst.components.herdmember:GetHerd() or nil local count = herd ~= nil and herd.components.herd ~= nil and herd.components.herd.membercount or nil local grown = SpawnPrefab("beefalo") grown.Transform:SetPosition(inst.Transform:GetWorldPosition()) grown.Transform:SetRotation(inst.Transform:GetRotation()) grown.sg:GoToState("grow_up_pop") if count ~= nil and count == 1 then -- add before removing or herd will be destroyed if herd ~= nil and herd.components.herd ~= nil and herd:IsValid() then herd.components.herd:AddMember(grown) end inst:Remove() else inst:Remove() if herd ~= nil and herd.components.herd ~= nil and herd:IsValid() then herd.components.herd:AddMember(grown) end end end This would turn the beefalo herds into goat herds. So yeah, if you have any ideas or feedback, discuss it.
  4. Slow Domesticated Beefalo Speed

    @Ozzey_Lee @fimmatek Bug is ancient and rare. Back from when domestication appeared. Both client and server logs are useless here. Any chance any of you can provide a cluster_x folder with the world with the bugged beef?
  5. @myxal 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.
  6. -- 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.
  7. Herds never merge

    -- herd.lua function Herd:MergeNearbyHerds() if not self.gatherrange or self:IsFull() then return end local x,y,z = self.inst.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x,y,z, self.gatherrange, {"herd"}) for k,v in pairs(ents) do if v ~= self.inst and v.components.herd and v.components.herd.gathertag == self.membertag and v.components.herd.membercount < 4 and (self.membercount + v.components.herd.membercount) <= self.maxsize then for k2,v2 in pairs(v.components.herd.members) do self:AddMember(k2) end v:Remove() end end end Notice the "gathertag". There's no other place in the code where a "gathertag" is mentioned. Therefore, herds never merge. NOTE: This applies to single player Don't Starve as well; I will mention it next patch time comes.
  8. @ScottHansen I can replicate the crashing at around the minute 50 mark or snapshot 8. You don't need godmode or anything of the like. What's required is to have either "Command Line Arguments: -threaded_physics -threaded_render" or "use_threaded_renderer = true" in client.ini. So you guys should go revert some of the commits made by @bizziboi. Or announce the render args are deprecated or something. Without threaded render the game doesn't crash... at least for now. And it doesn't look like it will crash anytime soon (after many hours).
  9. The Obligatory Forum Upgrade Thread

    I got the O2 badge but can't remember posting in the subforum. So, uh, there's that to fix. The color palette is the same ol' orange black white, but now there are clear distinctions between different content. It's welcomed. I don't like that the reply box text is light grey (unlike posts), because I have to concentrate to read what I'm currently writing. Overall, the update gets a thumbs up from me. Most important of all: there's a Lua syntax option in the code writing box. And looks like the "Paste" function is broken? Welcome the white void that shall not be deleted.
  11. Hope all is well.

    You were a large driving force to get me to spew code out in the Mods and Tools subforum before you could do the same.


    1. DarkXero


      All is well.

      Thank you for your kind words.

  12. Hello DarkXero,

        Long time no see. Here I need your generous help again.

        Since the cave edition of DST was officially published, the mod of World Regrowth didn't work for this edition to make the cave resouces respawnable. I have tried and tried with no result. Would you please help me? Much appreciate!

    Sincerely Yours,


    World Regrowth.zip

  13. Very nice. The beefalo bugs were fixed, and the domesticatable component is more robust. I have seen way less instances of domestication loss ticks. The beefalo doesn't go feral as fast as before, which is nice. However, a few of them are still there. I write the test process again. 1) Pick character 2) c_give("dragonpie", 2) 3) c_spawn("saltlick") 4) c_spawn("beefalo") 5) Give dragonpies to beefalo 6) Run away from beefalo, about a screen and a half (so the greetings and begs don't get in the way) 7) c_godmode() 8) c_speedup() Those pies should give around 2.5% of domestication. Now wait 5, or 10 days or until the salt lick runs out. Go for a coffee. If everything went fine, then no decay should be observable. You can also pen the beefalo in a very tiny cage instead of letting it wander and it will sometimes lose domestication.
  14. I went to test the beefalo changes. With the sleeping and entity asleep changes, most problems were addressed. Beefalo won't lose domestication while asleep, and the extra range helps them lick the salt while off-screen. This is pretty good for people that go caving. However, there's still a problem, easy to see. 1) Spawn beefalo. 2) Spawn salt lick. 3) Give the beefalo a dragonpie, some twigs. 4) Give yourself V2C mode (godmode). 5) Stand a screen away from the salt lick (so the beefalo won't run to greet you, but it's awake). 6) c_select() the beefalo, c_speedup() the game. 7) You will see 99.9% of the time the (nodecay) tag. What happens on the 0.01% of the time? The beefalo needs to salt itself again. But it's far from the salt lick, the distance needed is 4, instead of 15. So it needs to walk to it. If it takes too long, you can get a domestication loss tick in there. Why could this happen? It wandered too far from the lick, because of its brain, or because it went to greet you and spent some extra seconds on alarm state or beg state. So basically, solitary bases are fine. Bases with people running around may find their beefalo go feral without notice. Also these weren't fixed. I updated the reports with possible solutions. On a more happy note, the twiggy trees have the perfect ornament distribution out of all the Winter's Feast trees.