AI Main settling continent is the continent towards the AI is sending the ships loaded by settlers.
Default selection for this is, a random tile on a random eligible continent, which means :
-The continent cannot have any non-neutral non-settler unit of another player
-And it cannot have a non-neutral city, including own.
-The tile selected cannot have a node, lair, etc or city or unit of another player.
That's very restrictive and generally means the AI will only ever send settlers by ships to land which has not been discovered by anyone else.
The good news is, I was able to force a check for the continent having spots where a settler can build a city, so continents already filled with cities by others will not be selected, making that restriction not longer necessary.
The most important part is, continents where it's impossible to build do to a nearby continent having a city too close will not be selected (typically tiny islands).
However, by removing the "no one has city" restriction, it is now possible to ferry settlers backwards : from the continent containing the best race available to the home continent with inferior races. I suspect this was another reason why the AI overlooked territory : Since it was already own, but the continent couldn't produce settlers due to being of an inferior race, the settlers produced elsewhere, but they could only go to uninhabited continents.
Now this however raises a question. Own cities on the continent are fine, but what about cities of other players? Do we want to allow the AI to send to a continent that has enemy cities? Or armies? Note that here, "enemy" refers to ANY player including the AI's allies or people who have no treaty whatsoever with them.
Basically there are 6 continent ratings :
1 - Own armies make up 90%+ of the units on the continent and it contains owned city
2 - Own and other player units both exist and it contains owned city
3 - No owned city present (other wizards might have cities)
4 - Allied city present but owned city is not
5 - No targets (an own large stack found nothing to attack and is leaving)
6 - No targets 2 (There are literally no more neutral or enemy units or objects left on the entire continent)
I don't feel like any of these would make a good condition on settlers destinations... 1 and 2 are obviously good, 3 might be either suicide swarming with enemies or an empty place no one claimed, 4 is, well an ideal place to steal land for allies, and 5/6 say absolutely nothing about the continent aside form it being non-hostile.
Actually...how about this :
Send settler if
-Continent is NOT type 3 (no targets or presence of own city, or presence of ally should mean it's likely safe)
OR
-Continent has no enemy military present (so unclaimed lands still work)
Default selection for this is, a random tile on a random eligible continent, which means :
-The continent cannot have any non-neutral non-settler unit of another player
-And it cannot have a non-neutral city, including own.
-The tile selected cannot have a node, lair, etc or city or unit of another player.
That's very restrictive and generally means the AI will only ever send settlers by ships to land which has not been discovered by anyone else.
The good news is, I was able to force a check for the continent having spots where a settler can build a city, so continents already filled with cities by others will not be selected, making that restriction not longer necessary.
The most important part is, continents where it's impossible to build do to a nearby continent having a city too close will not be selected (typically tiny islands).
However, by removing the "no one has city" restriction, it is now possible to ferry settlers backwards : from the continent containing the best race available to the home continent with inferior races. I suspect this was another reason why the AI overlooked territory : Since it was already own, but the continent couldn't produce settlers due to being of an inferior race, the settlers produced elsewhere, but they could only go to uninhabited continents.
Now this however raises a question. Own cities on the continent are fine, but what about cities of other players? Do we want to allow the AI to send to a continent that has enemy cities? Or armies? Note that here, "enemy" refers to ANY player including the AI's allies or people who have no treaty whatsoever with them.
Basically there are 6 continent ratings :
1 - Own armies make up 90%+ of the units on the continent and it contains owned city
2 - Own and other player units both exist and it contains owned city
3 - No owned city present (other wizards might have cities)
4 - Allied city present but owned city is not
5 - No targets (an own large stack found nothing to attack and is leaving)
6 - No targets 2 (There are literally no more neutral or enemy units or objects left on the entire continent)
I don't feel like any of these would make a good condition on settlers destinations... 1 and 2 are obviously good, 3 might be either suicide swarming with enemies or an empty place no one claimed, 4 is, well an ideal place to steal land for allies, and 5/6 say absolutely nothing about the continent aside form it being non-hostile.
Actually...how about this :
Send settler if
-Continent is NOT type 3 (no targets or presence of own city, or presence of ally should mean it's likely safe)
OR
-Continent has no enemy military present (so unclaimed lands still work)