Builder AI Freezing
Dntredea1 opened this issue · 30 comments
1.11 beta v10 Minecolonies version
version minecraft 1.11.2
Expected behavior
- Create Builder's Hut or Townhall (Any building really)
Actual behaviour
- Builder stops building when running out of a material (Blocks, torches, etc.) part way through and just stands in one spot. (even when there are more blocks in builder's hut inventory) I'm able to solve the problem by handing blocks to the builder directly. No text prompt was given in chat.
Yes, he dosen't ask for items, he just stands by the build site. So far when building structures like Citizen huts (level 1 and 2), builder's Hut (started a new world to check) and Townhall.
The builder will get frozen on blocks:
-Oak wood planks,
-Glass Panes,
-Oak Wooden Stairs,
-Oak / Spruce Wooden Fence.
-and Oak Wood Block.
Once the builder is done using a block type, he will walk back and grab a stack of an item or block. But if the amount the builder needs is more then a stack (or more then what is at the builder's hut inventory) he will freeze in place. I've been able to know what is needed because the builder is holding the item in question. Even when it is not in the builder's inventory.
I have found a Workaround: Put the items into his inventory, not in his chest!!!!! the chest seems to be bugged. fix is needed
I noticed that too. I think the problem is that the builder isn't checking the building hut when the builder runs out of any item. Somehow the builder stands there thinking it has more to place and does not. Therefore, the text command asking for items never gets sent.
no definitely not
best building would probably townhall since there are a lot of blocks to place. just put all stuff he needs in the chest and let him start
maybe it is also necessary that he alreay has some items (from previous building?) so he is already building when you put in the materials
it looks so random which makes it hard to investigate.
I've seen the problem happening when building Citizen hut (level 1 and 2) and Townhall. It could be problem of having left over blocks and items from previous builds when starting another build.
If it's a problem with have left over items, maybe have the builder dump those items when finished with a build?
I recorded the problem, nothing shows up in the log or game output.
https://youtu.be/6aZaw-U8CD0
exactly as it looks at my client.
It seems to not appear, when he got no of the matrials or all of the materials in the inventory.
It ever happens, when he needs for example 20 oak slabs but only got 10. then he will start building with the 10 until they are empty. He will nevery say, that he needs more and he will never try to get new ones.
I think there might be an issue with a loop in the code. When he is building he is in the loop, never checking if he requires more materials and so staying in the circle of death
EDIT:
Miner shows excatly the same becavior when building in the mineshaft. assuming he has 30 fences he will dig down and build those plattforms.
One Platform will take 16 Fences. -> he will have 14 left.
now comes the part I AM ASSUMING:
I will write the actual behavior in pseudo code since its way easier for me to express it.
var fences = inventory.fences.count
if (fences>0) {
build()
}
else{
console.out "I need x Fences!"
}
function build() {
finished = false
while (finished == true) {
try {
placeBlock()
}
if (blocks.toPlace <= 0) {
finshed = true
}
}
}
Basicly what i found that he only checks his chest after the subsequential tasks for example 3 glass needed, 2 oakwood needed. but never in between the same step like 12 oakwood needen 7 oakwood needed 3 oakwood needed and so on
I've not seen the builder get out of the loop. I've waited about 15 mins and saw no change. Not sure how long it is suppose to take
I have seen this a numerous time lately.
- Can not fire the worker
- Cancelling the job a creating it again does not work either
- Killing "sort of" fix the problem.
What about to be able to fire someone when automatic but not hire ?
Or have a meaningful message saying we can not fire when in automatic mode ?
In that case, a message to the player saying you can not Hire/Fire in automatic mode should be implemented.
Right know, there is no visual indication that it is not possible to Hire/Fire
(I have been mass killing for too long :) )
added the above fix.
please could someone else test it, its my first git-hub contribution works fine on my client
so it seems there are more issues than before now.
so I would still recommend my fork with the workaround:
https://github.com/forReason/minecolonies
Same here too.
3 different behaviours:
- Staying next to the building but missing the block to continue but does not go back to its hut to ask (btw the blocks where in his chest waiting for him)
- Resources needed (in the tab) are different from what the builder is asking
- Resource needed filed when no worker or no job for the builder
- Sometime I can not open the builder inventory until I fire/hire him again