AI and upgrading units

modmyciv

Warlord
Joined
Oct 5, 2009
Messages
175
My fantasy mod is working well but I have hit a problem. I wanted to give each Civ. distinct units that I didn't want to be built - for various reasons - so I made Small Wonders which summon a small generic unit, which can then be upgraded to these unique units. This works weel for the player. and the AI does upgrade occasionally, but has a habit of leaving most as the near useless initial unit. What factors are involved? The initial units are, for the most part, immobile and very weak (Dragon Eggs or Magic Students etc.). I don't want to have to start a major revision and I don't have enough buildings to give each Civ. seperate Small Wonders.Similarly later upgrades aren't being made, these use King units to ensure they can't be built. Any ideas?

Thanks
 
First of all, units can only upgrade in a town with a Barracks-type building ("Allows veteran units" flag). So if the SW is built in a town without a Barracks, and the autoproduced precursor-unit is immobile, then the AI will not be able to upgrade it. To change that, You can either make the Barracks a required building for the SW, or give the 'vet-units' flag to the SW itself.

Also, if the AI simply can't afford to upgrade a unit, it won't. So making the initial unit the same price as -- or even more expensive than -- the upgraded version is one way to encourage the AI to upgrade. If lack of gold is a general problem, you can also cap the slider-values for each government, which should (at least in theory) prevent the AI from dedicating its entire commerce-income to Science-research, and hence gain some additional TAX%-income.
 
Cost a factor - can make then cheaper easily enough, won't hurt gameplay too much. the Dragons were very expensive, but you don't get many anyway. I hadn't thought of the Barracks problem, the AI does have a habit of building Wonders in smaller cities. I'll fiddle with things - thanks.
 
Last edited:
Back
Top Bottom