Opened 9 years ago

Last modified 9 years ago

#3308 closed defect

Naval map management by the AI no more working — at Version 1

Reported by: mimo Owned by:
Priority: Should Have Milestone: Alpha 19
Component: AI Keywords: pathfinding
Cc: Patch:

Description (last modified by mimo)

The AI needs to know what are the passable tiles, either for land or naval units, but it also needs to know which tiles are adequate for loading or unloading units from a ship. With the old pathFinder, this was done by looking at the tiles which were passable both for land and naval units because this information was available without clearance. But in the new pathFinder, we have the land passable tiles without clearance, but the smallest clearance for naval units is 4, so that there is usually no more any overlap and the AI is unable to find a landing place in most islands. The best solution would be to add a new passability class "default-water-only" which would be the analoguous of "default-terrain-only" for water. But as there are already 8 classes, that's may-be not desired. Another possibility would be to change the "ship-small" class, reducing its clearance. As it is only used for fishing ships which have an obstruction of 2, putting 2 instead of 4 as clearance should work for the pathFinder and would allow to recover most of the overlaps for the AIs to be able to find landing places. Or possibly another solution I didn't think of ?

Edit: according to the comments in pathfinder.xml, default-terrain-only is used only by the AI and not the pathFinder. As it is static (no need to update it), it could be removed from the passability grid leaving room for another possible class and be transfered to the AI as a second grid (with the default-water-only) only at initialization.

Change History (1)

comment:1 by mimo, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.