View Full Version : AI uses Culture spending very rarely


Optimizer
Jan 24, 2006, 04:54 PM
As far as I have seen, the AI almost never uses culture spending. Only a few times I have seen an AI spend 10% on culture, though the AI has plenty of unhappy citizens.

This gives the player unfair advantages from entertainment-producing buildings. Also, the AI does not use the strategy to have a large culture budget on late-age starts (ad zero science).

Can the AI be encouraged to increase the culture rate?

spincrus
Jan 29, 2006, 10:25 AM
I was looking for the solution of the exact same problem, so I started to explore some of the XML files.

I'm not exactly sure with my results, but here's my guess and the outcomes of my expedition.


In the CIV4CommerceInfo.xml (located in the ...\Assets\XML\GameInfo folder) there is such a line:

<iAIWeightPercent>A NUMBER</iAIWeightPercent>

For gold, research and culture, his value is set to 100, 125 and 25 respectively. So I'm guessing this is the value that keeps the AIs culture levels down.

Another theory I have is, that these values must all add up to 250, as the percentage value written in the code does NOT correspond directly to the percentage set within the game by the AI (like, it's 25% here, but within the game, it's 10%). So there's a 1:2.5 ratio from InGame to Code. Otherwise a value of 125% for research would not make sense.

So I'm thinking that these values equal to the EMPHASIS an AI has to give towards gold/research/culture.

I need someone who knows where iAIWeightPercent tag is being defined within the Python files to confirm my theories for me, as I'm not good with Python myself and my moderate computer programming/coding/scripting knowledge only brings me this far :)

I'm a graphics person, dammit! :rockon:

snarko
Jan 29, 2006, 11:31 AM
I need someone who knows where iAIWeightPercent tag is being defined within the Python files to confirm my theories for me, as I'm not good with Python myself and my moderate computer programming/coding/scripting knowledge only brings me this far :)

It's not defined in python. Very little except for parts of the interface is.

spincrus
Jan 29, 2006, 11:55 AM
That's why I'm having trouble finding where stuff like "entevent" are defined, then. Thank you.