What tempts AI to build city improvements?

Wolfshade

Little Winger
Joined
Sep 30, 2010
Messages
982
Location
Minsk, Belarus
What tempts AI to build city improvements? This question is directly to Herr Civinator, but input from senior modders will be highly appreciated as well.

I feel as I have a problem with the mod I work on with AI refuses to build city improvements. I had this feeling for some time, but finally I'm asking because I don't understand something.
Playing regular C3C, I see AI doesn't build city improvements until Republic govt (and my initial guess was "there's no tile penalty"). Wonders - yes, improvements - no, improvements = pre-requisites for wonders - no. What AI builds - is a big number of units. The same with my mod - and initially I thought I'll be OK with it, but I was mistaken. :dunnow:

Completely different situation I see in CCM (that's why I'd like to ask Civinator) - under Despotism (tile penalty govt), AI build wonders (expected), but AI builds city improvements as well. What is the trick is used here? :) Please, teach me (and, probably, other people who faced this trouble also), big Blue Lion! :)

Differences between my WIP & CCM I already noticed:
1) city improvements maintenance cost = 0 (applied in my WIP, doesn't help);
2) AI city has a defender in it before starting city improvement creation (in my WIP there are offensive units only);
3) AI has a + gold balance (in my WIP it's 0 or -);
4) settlers & workers auto-production (normally in my WIP).

Probably, I missed something so, please, feel free to ask.

Thank you, guys!
 
The AI does build improvements when I play regular C3C. They do so too in any mods I've played. So I don't recognize your problem.
 
Thanks for input, Yoda! The only thing I'd like to point to again - does AI build improvements under tile penalty govt (Despotism), or later (I see it does build under Republic)?
 
Thanks for input, Yoda! The only thing I'd like to point to again - does AI build improvements under tile penalty govt (Despotism), or later (I see it does build under Republic)?

In my personal mod there is tile penalty untill the late second age, and the AI does still build improvements. I don't think there is any effect of tile penalty on whether or not they build improvements.
 
Thanks for replies, guys!
Supa, no, there's a time of peace.
Yoda, thank you for the hint, I'll check out the very 1st C3C mod I ever played and understood I want to mod myself. :) Tile penalty is not a problem, but I can't understand what's wrong myself, so asked for advice.
 
I've seen this before too, Some tricks you can try - use flavors - If the Civ is a Lupine Civ and the improvement is also tagged as Lupine, it increases the chance of that Civ building that improvement.

Another heavy handed trick is culture. Give something a culture point and it becomes much more desirable to the AI.
 
>> Another heavy handed trick is culture. Give something a culture point and it becomes much more desirable to the AI.

On the same theme, if your improvements have the "Replaces bldg with this box checked", AI will only build them if it's getting at least one bonus hammer out of it.
 
Wolfshade, thank you for your kind words :), but as other posters here pointed out, there are other mods around that don´t face that problem, too.

On the other side in CCM I tried to help the AI whenever I saw a chance for it. Many differences of CCM were listed up by you. Other "assists" for the AI -like the use of flavours- were shown by other posters (in fact it seems enough to use one single flavour for the AI to push up its acceptance a little bit of doing somewhat).

Not listed up by you is the main "gamebreaker" for constructing buildings: The enable-mobilization-flag in the advances setting. If such a flag is set (accidently) in an early tech, one mustn´t wonder, why the AI won´t build a lot of buildings. In CCM this flag is disabled during the complete gameplay.

May be it´s the combination of all these factors, that is positive in CCM -and of course other mods, too. :)
 
Flavors work, CoMM3 has ALOT of buildings that do absolutely nothing except auto-produce a unit. In fact, the only way to get better units is to build these buildings. AI has no problem with it and they aggressively build them, all the buildings have 100% flavor setting. (of course govt settings, etc are all different from the despotism settings).
 
Thanks everyone for the input! I found a solution myself. Summing up, AI needs a unit with the Defense strategy in a city to start improvements building - this caused a problem I had since to that time no defenders were available for civs.
Pretty simple, yep. :) If AI city has 10 offensive units with defense value 2 (sum = 20), but has no a single defender with defense value = 1, then AI counts city as unprotected (I'd laugh here, but, probably, that was made intentionally by developers for some reason - it's a topic for a separate strategy & tactics discussion).
Although I know a solution, I'll perform couple of additional tests:
(1) what if unit has (Offense + Defense) strategies simultaneously;
(2) what AI will do if it has 2-3 cities, but defenders auto-produced in only one of them - will AI spread them to all its cities or will keep in the original.
Probably, I'll find something additional to test, but this is a brief plan & questions I want to be answered.

Once again, thank you all for the input! I'll inform you about results I'll have to provide some little but useful info. Thanks, guys!
 
>> (1) what if unit has (Offense + Defense) strategies simultaneously;

AI selects one flag at random when the unit is created and will only consider it as that type.
 
Thank you for the hint, Supa! But it selects truly random (if attack = defense), or it compares attack & defense values and then decides (defense > attack, vice versa)?
 
You're pretending again to be an old man, Oz. :) I see your memory is clear and your mind is powerful, so you're not so old to post the :old: smile. :) (j/k, no offense!)

Thank you for the info, although I have no problem with units yet, I will study. :) Thank you!
 
You're pretending again to be an old man, Oz. :) I see your memory is clear and your mind is powerful, so you're not so old to post the :old: smile. :) (j/k, no offense!)

Thank you for the info, although I have no problem with units yet, I will study. :) Thank you!

IIRC somewhere in there is what the AI will build in an empty city ... bizarrely I THINK it's the lowest DF "D" unit available ...

Best,

Oz
 
I do not have problems with the AI building improvement in my mods, but most of the buildings have bonuses of one sort or another.
 
Besides the need for defense units, the AI might sometimes get stuck in mobilisation, but never at such an early stage in unmodded civ. There's a reason why it's called the artificial idiot, you know.
 
If you have at least 1 defensive unit set in the Biq for the AI under "Difficulty Levels", the Least Defensive Unit available will be placed in the Cities from the start of the game.

Other than the Mobilization factor, simply provide Culture and Good benefits from the Improvement. Consider setting Auto-Produced Units from the Improvements as well. You should have no problem with the AI building Improvements.
 
Thanks a lot to everyone for the input, guys! Although I found a solution, I wanted to run 2 additional tests as well:
(1) what if unit has (Offense + Defense) strategies simultaneously;
Single or 2 strategies simultaneously, but "Defense" is enough for AI to count the unit as a defensive one (even if its defense value is lower than any offensive unit), so AI uses it is for both purposes. Not sure what to add to the thread about unit building since more time should be spent on the observation.
(2) what AI will do if it has 2-3 cities, but defenders auto-produced in only one of them - will AI spread them to all its cities or will keep in the original.
AI stores them in the city where they were originated, mostly. So the trick with autoproducing (small) wonder doesn't work as I wanted it to be.

Summing up, observations are following:
1) to start improvement (any bonus - but no autoproduction), AI needs a unit with "Defense" strategy in the city;
2) to start wonder, AI needs a city only :) (no defender required);
3) AI loves autoproducive buildings - it will build them anyway (defender is not required).

So I got the crazy thought of the mod where no units may be built normally, only autoproduced. :) Gary already posted about such a mod he created himself (didn't publish), but there are 2 big problems:
1) no combat promotions line - only veteran & elite (in terms of the original C3C) available. I don't count it as a big pain, but anyway it's a question;
2) no matter how much money & resources your civ has, you can't build more units than allowed by autoproduction. Yes, people try to limit down units production by AI using different approaches, but that doing they limit ability of the small country to fight against the big one.

Any thoughts on this?
Moderators may split a thread if they think it's necessary.
 
Back
Top Bottom