AI and Traits

ripple01

Emperor
Joined
Mar 7, 2006
Messages
1,254
Location
New York City
This is a question for anyone who has messed around in the SDK for the AI:

Is the AI coded to adapt its playing style to the traits it has? For example, if a leader is Industrious is the AI coded to focus more on building wonders, or is this all accomplished through the values in the LeaderHeadsInfos.xml file?

Cheers,
ripple01
 
IIRC, it is a combo of the information in LeaderHeads and some indirect effects from the traits.

When deciding what to build, one of the factors is the build cost/time. The reduction in Wonder costs from Industrious modifies that aspect of the decision.

There is no "IF Industrious THEN Build Tons-O-Wonders" type code on the other hand.
 
Buildings production preferences are the Flavors. Eg, Alexander's flavors are Military=5 and Growth=2, so he prefers barraks and drydocks, and secondarly Granaries and Lighthouses.

Units production preferences are the UnitAiWeightModifiers. Eg, Alexander has UnitAIAttack=100, so he prefers to build attacking units, like phalanx and swordsman, and leaves scouts and galleys aside.

Wonders production chance is set by the WonderConstructRand.
 
Top Bottom