MineColonies

MineColonies

57M Downloads

Pathing issue with colonists: They go swimming [$10 awarded]

kedamono opened this issue ยท 7 comments

commented

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

  1. Build a Fishing hut on one side of a large body of water.
  2. Place a citizen hut on the opposite side of body of water.
  3. 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.
  4. Use the command /time add x to make it night time.
  5. 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.

commented

Builders do the same, even when a bridge is available.

commented

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:
2017-05-22_11 35 31
2017-05-22_11 37 46

And after the change:
2017-05-22_11 44 13
2017-05-22_11 44 52
2017-05-22_11 59 49

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.

commented

Also, you can see here that if there was more water, they would path around it, these values may need to be tweaked still:
2017-05-22_12 21 37

commented
commented
commented

I did increase the priority of paths, but I didn't test it. I can fix that AI task

commented