I think the problem is that your map may be too complex for the AI pathfinding, especially when factions have lords and fiefs on islands which arent connected to the main land.
Afaik there is no way to efficiently "get" the point when a party is trying to go from land to sea,although the other way around a script is called by the engine that makes a menu pop up for the player party. So you are able to work with that menu for the player - not the AI.
插入代码块:
#script_game_on_disembark:
# This script is called from the game engine when the player reaches the shore with a ship.
# INPUT: pos0 = disembark position
# OUTPUT: none
("game_on_disembark",
[
(jump_to_menu, "mnu_disembark"),
]),
That means for your concept that you would have to switch the ocean with an unused terrain (and alter that to look like the ocean) so the AI can travel it. That way you could then switch the Map Icons when the according terrain is being travelled. I suppose you could also try to work with (map_get_water_position_around_position,<dest_position_no>,<source_position_no>,<radius>), but as the radius can only be 0,1,2,3,etc this will be difficult to use, if its possible at all.
I would advise you to simply keep the factions on the mainland and populate the islands with mini factions, pirates, mercenaries, natives, traders, whatever you can think of. I would have to see your map to better understand why the pathfinding doesnt seem to work for your ships. (It does in native.)