Closed GoogleCodeExporter closed 9 years ago
That's because the other inn IS closer by the number of tiles between them. We
don't have an efficient way to test the length of a route when walking on a
road, so we can only do a straight distance test. It would have to build a
route to every possible destination then chose the route with the shortest
distance. This is similar to the resource harvesting, e.g. your fisherman might
go fishing on the other side of the river because it is within his harvesting
radius, even though it takes him 5 minutes to walk there. I've modified the
item on the bugs list to mention this case but I think this will be complicated
to fix.
Original comment by lewinjh@gmail.com
on 8 Nov 2011 at 1:55
And what if there is no route to the nearest inn?
Original comment by kocsis1d...@gmail.com
on 19 Nov 2011 at 10:19
Then they will not use that inn. It only selects from inns that are on the same
floodfill island as the unit is on.
Original comment by lewinjh@gmail.com
on 19 Nov 2011 at 10:26
I wanted to test it, but the result is interesting.
Original comment by kocsis1d...@gmail.com
on 19 Nov 2011 at 12:48
Attachments:
Yeah the delivery system is not designed to handle independent villages on one
team, so it lags a lot due to failed path finding
Original comment by lewinjh@gmail.com
on 19 Nov 2011 at 1:51
Ok that is fixed. That test mission in Bug.7z now runs smoothly and correctly.
The delivery queue was not checking whether the serf can access the from house.
Thanks.
Original comment by lewinjh@gmail.com
on 19 Nov 2011 at 2:43
Maybe you can use a serf path-finding script to find the nearest inn by road
tiles?
Original comment by ppienia...@gmail.com
on 27 Nov 2011 at 1:54
Yes we can, but path-finding algorithms take a lot of CPU so it must be
implemented efficiently. That is our final plan for this system, we just
haven't had time to do it. Same with the fisherman walking miles to the far
side of the river because it is within a radius of his house, and other
villagers like stonemasons, woodcutters, etc.
Original comment by lewinjh@gmail.com
on 27 Nov 2011 at 2:00
Lewin has fixed pathfinding bug we had. Also he has made citizens-miners to
walk wothin their mining radius. Picking Inn uses closest one, that's not a big
flaw and we probably won't work on it.
Original comment by kromster80@gmail.com
on 17 Dec 2012 at 5:51
Original issue reported on code.google.com by
jec...@gmail.com
on 8 Nov 2011 at 12:12Attachments: