Crafters and Request System
Aelhan opened this issue ยท 4 comments
Hello everybody !
Minecolonies version
minecolonies-1.12.2-0.10.302-ALPHA-universal.jar
Expected behavior
When several workers request something to the same crafter, the requests should queue and the crafter would respond to each request one after one.
Actual behaviour
When several workers request something to the same crafter, the first request is resolved by the crafter, but the nexts are ignored, and in the worker request tab, the request has to be resolved by player instead of crafter.
Steps to reproduce the problem
- Make your builder erase a mountain
- Make your miner mine
- They break their pickaxe and request a new one
- ... Profit
Proposal to resolve that
I've noticed that when i cancel the request (when he asks for a player resolve), the worker requests again and that's nice, but i have to permanently check everyone if they have a stuck request. I think it would be nice if when a request has to be solved by player, it would be auto cancelled after 30s or 1mn. That could let me do something else that checking ;)
Other point I want to suggest
I think it would be nice if we had an option into the GUI to say to workers they ask spare tools in they work chest (for example, my lumberjack has an axe in inventory, but no in workchest, so he sends a request, and wins a lot of time when his axe breaks, he takes the one in the workchest and asks for a new spare one, idem for miner who wants spare pickaxe and shovel, builder the three tools).
Edit : I've just seen this point can be related to the planned feature #642
I apologize for my bad english, i don't know if my request would be more clear in french, so in English, that's quite difficult !
Last thing, the most important
Congratulations and thanks to the whole team for creating and updating this marvellous mod !
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
closed in favor of other issue
Can you test the dman and crafters here:
I have noticed this same issue and I think it is actually due to a failure of the deliveryman/request system- they are not delivery the quantity of items actually requested and the crafting chain hangs up and can never finish. I have noticed the incorrect quantity issue when using the postbox. For example I will request 64 cobblestone (I have thousands in the warehouse) and they will, half the time, deliver some random number of cobblestone and call the request complete (its removed from the postbox queue).
I have watched my Builder and Miller for example and the Builder will request an oak door, but instead of getting 6 oak planks, the miller will only get say 3 oak planks and never anymore. Its possible to overcome this for awhile by loading up the Sawmill with wood, but that only works until the deliver-people empty out all the stock.
Its of course possible its an issue with the crafters to, but I think this is strongly contributing to the above issue.
Was looking info about same issue and it's still present in 343 alpha.
My builder was requesting 24 stairs. No ready made stairs in warehouse, so request went through sawmill. Delivery was split: 5 planks with one guy and rest 13 with another. First 5 was delivered and following 13 was just cancelled. Sawmill worker was waiting more till next dman just removed previously delivered 5 planks and whole process was fail.
Reseted request system and builder requested again 24 stairs. This time planks were split into 3 and 15 deliveries, second was cancelled and no stairs were made.
Did another reset and 18 planks required to make 24 stairs (Quark numbers) were split again, second delivery never arriver and sawmill couldn't do anything.
When this happened, I had 4 dmans with lvl3 huts. Other than failing most of the time second part of split delivery, they are working fast, everything available directly from warehouse gets delivered very quickly, but if its multistep order and has to go through sawmill, they fail to deliver right amount of items and whole process collapses.
To be fair, it's not like it fails every single time. There are many cases when both split delivery parts actually arrive, items were made and delivered. But cases when small order fails 3x in row are bit frustrating and give me big suspicious "bug" feeling :)
It is, cause this is a hard issue to fix.
The root cause of this, is how the RS deals with cancallations and mishaps that happen.
In the initial design document we decided to clean up failed requests.
This works, up to a certain Degree, and when we added the crafters this came more to light: The system breaks if cancellation breaks.
To fix this I (since I am the person who wrote the RS in the first place) need to fix the way we do cancellation, instead of cleaning it up, we will leave the remaining items in the inventory of the Citizen (and hope he cleans it up himself, which all Minecolonies Citizen do, at the point of writing) and just cancel the whole damn request tree.
This fix in General is complicated enough, since it involves several core parts of the RS, which takes time.
Additionally I wanted to make sure that something like this never happens again, so I needed to write tests that validate this behaviour, everytime we make a change. These Unit tests however requried a major rework of how we define things in code (see PR #3777), additionally the port the 1.14 has started and all my work Needs to be ported to that as well.
All in all, this just takes a bit more time then I wanted, but it is getting there.
Greets,
Orion