Jump to content

Plants in an area will sometimes be split into 2 incomplete herds


Electroely
  • Fixed

With some specific timing (which can happen at random,) players might create two or more domestic plant herds in one area, causing the plants to count separately from each other for the purposes of Brightshade spawning.

This occurs because herds collect members & merge nearby herds every 6-8 secs (chosen randomly in components/herd), and new herds are created for herdless members 5 seconds after their creation (as per components/herdmember). This is difficult to consistently replicate due to the randomness of the member collection timer, but if a plant is planted right after the member collection occurs and 3 more plants are planted within 5 seconds, a new herd of 4 members will be created (as new herds instantly collect members) and it'll be ineligible for merging with the first herd.

This can be fixed by extending the herd creation timer to 8 seconds instead of 5 in components/herdmember.lua.


Steps to Reproduce

Difficult to reproduce without using console to determine the random timer.

Using the command

OnUpdate_Old = c_find("domesticplantherd").components.herd.OnUpdate c_find("domesticplantherd").components.herd.OnUpdate = function(...) print("herd update") return OnUpdate_Old(...) end

will cause the nearest plant herd to print into the log whenever it runs its OnUpdate function, to help replicate the issue.

1. Plant 4+ saplings using the dug sapling item.
2. Wait for the herd update to happen
3. Plant 4+ more saplings in quick succession
4. After the next herd update, use c_countprefabs("domesticplantherd") to check that 2 herds were created, and they're not getting merged

  • Like 1



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.


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