Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diggers bug #1

Closed
Pp-4 opened this issue Jan 17, 2022 · 2 comments
Closed

diggers bug #1

Pp-4 opened this issue Jan 17, 2022 · 2 comments

Comments

@Pp-4
Copy link

Pp-4 commented Jan 17, 2022

sometimes too many diggers are assigned to a new construction, causing them to get stuck on the construction site , happens mostly when constructing small buildings. Bug occurs on history edition , don't know about other versions

@nyfrk
Copy link
Owner

nyfrk commented Jan 17, 2022

Thanks for the report. I guess that the first patch imposed by the plugin also tinkers with the diggers in some way. Looks like the diggers get assigned faster to a building than the game can track. We probably have to insert a condition to somehow exclude diggers from the removed delay.

I will have a look into it.

@nyfrk
Copy link
Owner

nyfrk commented Jan 22, 2022

I think I found the problem. It is caused by the third patch named "CarrierSiteJobCreation". This does indeed not just affect carriers but also diggers and builders. Therefore the bug probably also affects builders. The "CarrierSiteJobCreation" Patch is invoked per building for as long as it is under construction. The problem is: A digger takes 9 ticks to walk to a neighboring field (and some additional ticks to start working). However, when we assign multiple diggers to the same dig-position, we will run into a problem since settlers will push themselves away whenever a field is about to be occupied twice. The digger/builder does not have enough time to start working on the field. When a settlers works a field it cannot be pushed away by other settlers - which will prevent the push-away situation. However since no worker can start working the field we effectively deny any worker to process the last field.

So, what would be the best fix? We could just remove the patch and increase the delay back to 15 ticks thus being save since it would be greater than the 9 ticks walkspeed and it would be enough time for a digger/builder to start working a field. We could also get deeper into the logic function to differentiate between builders, diggers or carriers while the building is under construction - selectively applying the patch for carriers only or as long as there is enough fields to be worked on.

The bug does not occur anymore in version 1.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants