Pathing issue with colonists: They go swimming [$10 awarded]
kedamono opened this issue ยท 7 comments
Minecolonies version
version 0.6.3317.
Expected behavior
- When a colonist/guard goes to the next waypoint, they stay on dry land.
Actual behaviour
- They take the shortest route, typically going for a swim, even if there is no way for them to get out of the water on the other side.
Steps to reproduce the problem
- Build a Fishing hut on one side of a large body of water.
- Place a citizen hut on the opposite side of body of water.
- Make sure that there is a dry land/bridge route to the citizen hut. Preferable both. Make sure route is not a direct route to either huts.
- Use the command /time add x to make it night time.
- Watch as the fisherman swims across the body of water, ignore the dry route.
The $10 bounty on this issue has been claimed at Bountysource.
Okay, so I played around with this, and found that because our heuristic is valued so highly, the extra weight that we put on swimming doesn't have enough affect. I doubled the value, and I'm seeing much more reasonable pathing.
Here are some screenshots from before my change:
In the last one you can see that if a citizen can't get out of the water on the other side, they won't enter the water (This may not be true for when the path gets broken into several different attempts).
Also while looking at this, I found that we weren't properly deprioritizing jumping/falling. The citizens are now more likely to walk around a singular block if it would require them to jump.
I did increase the priority of paths, but I didn't test it. I can fix that AI task