Confused about SDK/Python Editing

1stcontact2035

Great Scientist
Joined
May 1, 2008
Messages
114
Location
In A Nightmare
I've never modded anything but simple xml tweaks before, but I want to start larger projects and don't know where to begin. I know some of how to write code and all, but ironically enough, I really don't know where I would do these edits in python or SDKing for a mod. I don't know if I need to download a special series of files, if there is something to assist me that came with Windows Vista, or if Firaxis has downloads specifically designed to assist in modding in this area.

I have a feeling that a lot of people are having the same issues with starting up mods, or at least have these issues and maybe don't know how to write code as well (which is a simple matter of picking up a Schaum's outline or googling examples). Anyway, I hope that someone can help not only me but also the countless others who need assistance but haven't asked yet.

1stcontact2035
 
You need a special program to COMPILE the SDK(DLL), and modifications to it are useless without compiling it. There is a guide to set it all up for free here though.

To modify Python, you just have to re-write it, which can be done in Notepad, though many people prefer Notepad++ or other enhanced programs instead. There is an actual Python Editor, but you do not require that to modify Python files for CIV4 to use.
 
The C++ (for DLL changes, usually gameplay or new rules) and Python (for the interface and some simple events) are included with the Civ4 install.

  • Python: Assets/Python
  • C++: CvGameCoreDLL
Both of these folders are in the install folder, e.g. "C:\Games\Civ4\Beyond the Sword" for me.

To modify Python files, simply copy the file you want to modify to your "C:\Documents and Settings\<user>\My Documents\My Games\Beyond the Sword\CustomAssets\Python", keeping the same directory structure, e.g. "Screens\CvMilitaryAdvisor.py". Then modify this copy.

This is the easiest way, but it means you'll play all games with your modifications. There are threads here about creating a full-fledged mod that you can load when you want to test it and not load when you want to play normal games.
 
Back
Top Bottom