AI and Events?

DuckAndCower

Warlord
Joined
Mar 7, 2008
Messages
215
I was thinking of trying my hand at brewing up some events, but I'm wondering how the AI decides which options to choose. Can you weight the options somewhere in the XML or is it completely random? If faced with a choice between, say, +3:culture: and +3 :food:, will the AI pick the food if its city is happy but stagnant, but the culture if it is growing but nearing unrest?

Any info on how the AI deals with events would be appreciated :)
 
There are some weight factors based off what the XML of the event will provide and what the AI is currently needing/wanting. But you can also use <TechFlavors> and <iAIValue> to help control what the AI will select. Using the Flavors will help to ensure that different leaders make different choices, and using the AIValue will help ensure that all leaders always make that choice (or avoid it)
 
Back
Top Bottom