Jump to content

Merging Lightning Goat Herds :o

  • Fixed

The herds of lightning goats merge together when they're too close. My evidence is the following.

I used c_countprefabs("lightninggoatherd"), which showed two herds. I LongUpdate offscreen so that they populate to full herds. I choose one herd and kill all but one goat. When that sole goat gets close enough to the other herd, the total herd count is reduced to one, evident by the countprefab command. There is no need to LongUpdate to populate the herds, you can just spam c_gonext("lightninggoatherd") upon world creation in a world that has two herds to start and see that if they're close together, the herd locations dwindles to one herd. Attached is a video showing it.

Credits to Frodeur for bringing it to attention, whose had this happen in his several thousand days world.


Steps to Reproduce
Method 1) If a world upon creation shows it has two lightninggoatherds with c_countprefabs("lightninggoatherd"), spam c_gonext("lightninggoatherd") and see that if the goats are close enough and aren't fully populated herds, they merge into one herd. Method 2) In an actual IRL scenario, wait for the herds to populate to about full capacity if there are two herds (I LongUpdated to speed up the process). Kill all but one goat in one herd, see that there is still two herds until you chase the lone goat to the other goat herd. See that the total lightninggoatherd has reduced to one via countprefabs("lightninggoat").

User Feedback

A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

So after further investigations I've made some discovery .
First I know that you've made some fix on the beefale herding mechanic on the game update 280490 . 

-Fixed bug causing Baby Beefalo to sometimes split from their herd when fully grown.
 -Fixed bug preventing herds from merging properly
BUT the thing I didn't know that the goat and the Beefalo shard the same herd.lua file .

I'm not sure anymore this is a bug then .... But Goat where not mentionned is this patchnote at all . Intended mechanic or bug ? Klei will decide the fate of my goat herd now .

  • Sad 1

Share this comment

Link to comment
Share on other sites

The patch note in question.

  • Fixed bug causing Baby Beefalo to sometimes split from their herd when fully grown.
  • Fixed bug preventing herds from merging properly.


Share this comment

Link to comment
Share on other sites

Take what I say with a grain of salt since I'm not comfortable with coding, but I believe I know where the problem is and a "potential" solution.

The three luas to compare were lightninggoatherd.lua, beefaloherd.lua, and herd.lua 

The issue is in herd.lua in terms of the the merging of herds, specifically the function Herd:OnUpdate(). In that function is self:MergeNearbyHerds(), which can merge herds together if they fulfill the merge criteria. What differentiates beefalos from lightning goats is that beefaloherd.lua can make new herds while lightninggoatherd.lua cannot (and they shouldn't be able to either). Since the lightning goats now merge from two herds into one herd, we permanently lose that herd when in theory we shouldn't since they can't make new herds.

So the goal is to make it so that lightning goat herds do not merge. My "solution" is make self:MergeNearbyHerds() in the herd.lua NOT applicable to lightning goat herds. As to how to do that, I don't know. What I've described may not be the whole story, the correct implementation or the correct understanding, so again please take what I said with a grain of salt. I'm more confident on what the problem is than the solution.

beefaloherd.lua can make new herds.PNG

herd.lua herd merger.PNG


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...