Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm interested in tinkering with the AI in Civ 5. I know there are XML files that can adjust the AI's strategies, but are there other easily moddable AI components? The XML files contain comments that reference some CPP files, are those available to end users or are those comments just aimed at internals?

share|improve this question
up vote 3 down vote accepted

The Civ 5 SDK has been released, which should include the source code for the core game library, including all of the AI code (including those files referenced in the XML comments). You should be able to change the AI to any extent you like, even going so far as to rewrite it completely if you so desired. Have fun! :)

EDIT: My apologies, but it seems I was a bit premature. It was my understanding that the sources would be included in the SDK as they were for Civ 4. Further inspection of the SDK reveals that those sources are not included. I suspect the sources will be made available eventually, and that they were excluded from the initial SDK release in order to get something into the hands of anxious mod creators. It's possible that Firaxis reconsidered their SDK strategy and decided not to release the sources at all, but I imagine that would invite quite a backlash from the community. I guess we'll just have to wait and see.

share|improve this answer
I'm likely missing something, but I've been playing around with the SDK and reading Kael's walkthrough, and I still am unable to find the source code for the core game library that you mentioned. – bwarner Nov 3 '10 at 1:44
Whoops, it seems I was wrong (or at least premature). I edited my response accordingly. – Mike Strobel Nov 3 '10 at 16:36
Not releasing good ways for players to mod the AI will kill Civ5. The current AI is craptastic. – Nailer Nov 3 '10 at 17:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.