50Ply Blog

Building Things

Enabling Civ4 Python Console in OSX

| Comments

I am now the proud owner of Civilization 4 (for Mac) and I’m really happy to see all of the modding potential that this game has.

For those of you just getting started (like me) the secret to enabling the in-game Python console on the Mac is as follows:

Open your Documents folder and find the “Civilization IV” directory. Then, open the CivilizationIV.ini in the text editor of your choice (TextEdit is fine.) Find the line that looks like

CheatCode = 0

and change it to

CheatCode = chipotle

Now, start a new game of Civilization IV (or load an existing one) and press Shift + ~ in game to bring up the Python Console.

Try typing these commands to see how the Python console works:

> print "hello world"

> print dir(gc)

There you have it!

If you have the Beyond the Sword expansion then follow the same instructions given above but find the CivilizationIV.ini file in your “~/Documents/Civilization IV Beyond the Sword/” directory instead.

Happy modding!