• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

AI city placement

tomplum68

Warlord
Joined
Oct 5, 2010
Messages
146
Location
Pittsburgh
Is there a way to mod AI behavior in regards to their city placement?

I know the AI has always had a bad habit of doing this but it seems worse in BNW...plopping cities one tile away from the coast!!

Its crazy how often the AI is doing this.
 
Yesterday I plopped my city 1 tile away from the coast. Why? Cause I don't need a city on teh coast with no water-specific resources.
 
I guess now that ocean tiles dont give gold its not as much of a big deal.

Ocean trade routes are better but a lot of times if you're going wide you'll have more cities than available trade routes.

Must just be an old habit that the coast had the most.
 
Yesterday I plopped my city 1 tile away from the coast. Why? Cause I don't need a city on teh coast with no water-specific resources.

I think you missed the point. The AI does dumb stuff. Not only that the AI does annoying stuff. Like place cities in little gaps between my cities or a few empty hexes near the coast. God that ticks me off.
 
Has anyone seen a debate involving any of the number crunchers to determine if coastal city placement matters anymore?
 
I think you missed the point. The AI does dumb stuff. Not only that the AI does annoying stuff. Like place cities in little gaps between my cities or a few empty hexes near the coast. God that ticks me off.
You're saying their methods are unsound? (sorry I just had to do it :p)

I'd say settling on the coast is more important than ever before. Those ocean food trade routes are crazy! Keep in mind that you can grow one city from size 1 to like 15 very fast, then move on to the next. You don't need to have a route to all cities at once.

If you're really annoyed about this and don't want to raise the city, just use the Ingame Editor mod to make a little inlet to the city. Consider it dredging the harbor; delete the first build of the city if you wish there to be some work involved. Some may cry about cheating but hey, it's your game and you know best how to have fun with it. Without the stupid AI this problem wouldn't exist (in multiplayer no one founds cities one tile from the coast I'd imagine, unless for defensive reasons or an awkwardly placed resource cluster) so it's only fair to fix it using your own methods imo.
 
The main issue with AI city placement is that even when the world is fairly well settled, they still want to expand. And rather than fighting for more land, their standards for new city placement just fall through the floor and they start settling 1 tile islands with no resources around them and what not.
 
All those crappy AI cities help mitigate the warmonger penalty when you take their good spots.
 
I do consider avoiding putting a city on the coast. It`s too easy to capture them there. All you need are 4-5 Frigates (and even better 4-5 Ironclads) bomb the city to nothing in the first turn of war and instantly occupy it. The AI has done this to me several times in surprise Naval attacks. It likes taking coastel cities this way. Much harder to do if even slightly inland.

It`s probably a smart move by the AI.
 
In my current game, my capital was to the west on a small island shared with France. I built my second city to the east (perhaps 7 hexes away). France builds their second city right in between my two cities.

After a short war, I raze their city to the ground. Peace. About 20 turns later, they RESETTLE right on the same spot! WTH?

That spot had no luxury resources, and only 1 cow pasture. There were so many other good spots!
 
I do consider avoiding putting a city on the coast. It`s too easy to capture them there. All you need are 4-5 Frigates (and even better 4-5 Ironclads) bomb the city to nothing in the first turn of war and instantly occupy it. The AI has done this to me several times in surprise Naval attacks. It likes taking coastel cities this way. Much harder to do if even slightly inland.
If this is your reason for deliberately gimping your cities, you need to build up your own navy. :)

It`s probably a smart move by the AI.
There's a sentence you don't see every day. :p I seriously doubt that they're coded to do this on purpose, but if they are, they should be reminded that the defensive effect is even better if they're two or three tiles inland, and there's much less useless tiles that way. Nothing is more useless than a coastal tile without a lighthouse, harbor etc... Ok snow and flat desert, but still, it's a worse than useless tile with 1 food and nothing else.
 
There's a sentence you don't see every day. :p I seriously doubt that they're coded to do this on purpose, but if they are, they should be reminded that the defensive effect is even better if they're two or three tiles inland, and there's much less useless tiles that way. Nothing is more useless than a coastal tile without a lighthouse, harbor etc... Ok snow and flat desert, but still, it's a worse than useless tile with 1 food and nothing else.

This has kind of become the question. If there is a spot you want to claim for a city near the coast but there are no ocean resources, does it make more sense to plot it 1 tile inland to gain any land resources or should you put it on the ocean anyway for the potential sea trade routes.
 
Putting the city one tile from a coast may or may not be a great move for a player, but for an AI it's not a terrible defensive move. I always get disappointed when the AI settles inland because those cities are much, much more difficult to steal from them later with an invasion. 2 tiles in being even better defended. At least with 1 tile in though the unit (usually) has to be in firing range of the city to attack it. Coastal cities are vulnerable to attack from 2 tiles away with battleships and there is no need to include a land unit at all to help you take them. More than once I've knocked the defenses of a 1-tile-away city to zero but been unable to get a land unit into the city to actually capture it.
 
I did it in a game earlier today, just because that was the best spot to get all the resources I wanted. If I had built on the coast I would have missed a Gold tile and Mt. Kilimanjaro and gained no sea resources.
 
Is there a way to mod AI behavior in regards to their city placement?

Your best bet is to check the Community Mod section. (VEM & GEM; they might have started on BEM as well)

There is one other minor tweak you can do easily in Global Defines dealing with how close the AI founds cities, (namely you can change the min distance allowed; but only for cities on the same landmass); but that would also affect the human as well.

I also recall seeing an XML file dealing with defining how the AI calculates the value of a future city site, but wasn't able to wrap my head around it.
Also as a cautionary note, I wouldn't be surprised if that calculation is also used by the land envy function.
 
I think the AI uses the same logic as the settler advisor, which is really really annoying, telling me to settle in horrible places, saying the a luxury nearby will make my people happy, when I already got a copy of that luxury. The AI is always giving priority to secure multiple copies of the same luxury just because they are closer, instead of running towards different ones, that really makes no sense.
 
This has kind of become the question. If there is a spot you want to claim for a city near the coast but there are no ocean resources, does it make more sense to plot it 1 tile inland to gain any land resources or should you put it on the ocean anyway for the potential sea trade routes.
It depends... Which is why the AI is bad at it, since it can only follow hard-and-fast rules and never adapt to different situations.

SackofOwls mentioned one case below. Gold and Mt Kilimanjaro vs sea trade route? I'd take the trade route unless it's very early in the game, when the food and culture from Kilimanjaro actually matter and it'd take time for the route to arrive. After all you can just pass by Mt K. with your units to gain the Altitude promo, no need to actually own the tile. As for the Gold, well, depends if you really need the happiness. Eventually you'll get it anyway; it's a pity though that tiles in the 4th and 5th ring can't be bought, only acquired culturally.
 
Actually if you are on Pangaea and the ocean city is your only one it does sometimes makes sense to forgo the ocean access. The trade routes will be caravans anyway. We all seem to be assuming multiple ocean cities but that isn't always the case.
 
Back
Top Bottom