1. Guide to Python In Civ IV

By Jon "Trip" Shafer, Firaxis

Well, I took some time off from working on my own mod projects to work on this, hopefully stirring up a bit more interest among other people. Modding in Python is really not difficult, but getting over the first hump is intimidating - at least it was for me. Now that I've learned it, I know some of the stumbling blocks I hit when trying to learn Python and particularly how it was implimented in Civ IV. Hopefully this resource will assist other people. If no one uses it and makes mods I'm going to give you all such a pinch. :P

I'm not really going to go over some of the basic things in programming, since there are better sources out on the net and in the real world than me for that sort of thing. I'm also not going to go over a lot of the stuff in Python itself for the same reason. For basics on both programming and Python itself, check out Gingerbread Man's thread over at CFC, as he's done a fine job in organizing things there.

What I will cover is a bit of OOP (Object Oriented Programming), as it's not something covered in GBM's lessons too extensively (he has a lesson on classes, but pretty much everything in CIV Python stuff relies on OOP), but I will also go over a few more basic things just to set things up the way I want, as well as for review.


1. Guide to Python in Civ IV: Introduction
2. Guide to Python in Civ IV: Basic Python
3. Guide to Python in Civ IV: Classes in Python
4. Guide to Python in Civ IV: Python in Civ IV
5. Guide to Python in Civ IV: Iteration (Looping)
6. Guide to Python in Civ IV: Civ IV Function Assignment
7. Guide to Python in Civ IV: Creating a Unit in Civ IV
8. Guide to Python in Civ IV: Class Reference (by Locutus)
9. Further Class Reference (by Solver)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License