AI workers not building improvements

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
For reasons I can't figure out, AI players in my mod are terrible at improving the land. They have the proper tech, they have workers, the workers have UNITAI_WORKER, the improvement would provide significant yields (of all different sorts), and the improvements are buildable. I know they are buildable because I can build them if I take over the civ after autoplay. But the workers just sit there in cities doing nothing. They do build some improvements, after a while, but not others. I can't see the pattern.

I've modded the heck out of everything. But I can't for the life of me think of what else the AI would need. There is an Improvements_Flavor table, but it is empty in base and I've left it so in my mod. I thought that this was one case where Firaxis avoided the dumb flavor system in favor of approximating value (in the form of yield).

I haven't dug into dll AI yet. Is it possible that Economic or City strategies are so goofed up that the AI doesn't want improvements?
 
I have yet to look into the Economic or City strategy AIs, so I can't be sure, but that sounds suspiciously likely (based on AI elsewhere).

I'd say try the Flavors table and see if it works. It might be that the base game improvements have some hard coded logic which asses their worth for the AI.

I'll try to investigate when I open up the DLL again tomorrow.
 
I think the problem may be in Resource flavors. Stupidly, base only considers luxuries for happiness, ignoring any yields or the massive amount of trade gold that these can represent. I have some civs with an excess of happiness, so I believe they see these resources as worthless.

God I hate the flavor system! Why can't they just estimate value from yields and other standard (table) effects? Sure, you have to add a fudge factor for marble or other special cases, but why code every item as a special case?
 
Back
Top Bottom