In Galactic Civilizations, Sins of a Solar Empire and Demigod, the difficulty levels of computer players were either hard coded or very hard to access for players.
In Elemental, the difficulty levels are in an XML file called CoreDifficultyLevels.xml
The game will read from the different difficulty levels and display them in game. Players can create new difficulty levels themselves if they’d like by changing this file.
In Galactic Civilizations, I only had 3 real variables to play with (and were all in a .h file). They were the AI intelligence, the AI money ratio, and whether the AI had FOW cheats.
The AI intelligence ratio was how often the AI got to use the “smart” algorithms versus the “normal” algorithms. The smart ones took up a lot more CPU but produced much more intelligent result (they are the halmark of what we used to refer to as the “SDS/AI” back in the OS/2 days).
In Elemental, we have a few more variables to play with such as whether the AI gets to use combat magic, how many points the AI gets to add to their sovereign (compared to the human player) and their starting funds.
What’s nice about a data driven difficulty system is that players can create their own difficulty levels as they see fit very easily. One of my favorites (that I would do in my personal builds of GalCiv) was to give the AI a ton of money but make it absolutely stupid so that I was just trying to make my way through hordes of poorly designed ships and terrible unit strategy.
With Elemental, I could see players creating all kinds of interesting scenarios because (and this should be remembered because it’s important) the keys are not file based. That is, you don’t have to put things into coredifficultylevels.xml. The game simply looks in directories based on the keys. So you could literally create a new difficulty level in a file called BobsSuperCustomLevels.xml and hand them out.
One AI promise from me personally to you guys
The AI in our games is only as good as I am. The better I get at the game, the better the AI will get. So while I’m working hard to make sure the AI in Elemental is good, know that it will keep getting better long after release. In the Starcraft 2 beta, I started out in Copper. Now, I’m in the Platinum league. Practice makes perfect.