This post isn't just an autobiographical diatribe... it's meant as a sort of crash course for making your own changes to the modpack (or any modpack, for that matter). Aspiring tweakers and modders, read on!
Even though I'm only a beginner with Python, I was able to achieve delusions of grandeur as an elite modder because of one amazing and free program:
WinMerge!
(Sorry for Mac/Linux folks out there... I dig ya, but I only do Civ4 stuff on Windows).
Here's a little story about how I made my jrayUGH modpack, and in particular how I incorporated the Enhanced Military Advisor. I think I'll call it:
"How I spent my winter vacation using WinMerge to create jrayUGH."
I keep all the files for my modpack at
C:\jrayUGH-v208a, and copies of the corresponding original Firaxis versions at
C:\firaxis-v208. (If a Firaxis file exists in
Warlords\Assets, I use that instead of the one in
Assets):
To see all the differences between my entire modpack and Firaxis' original files, I right-click on
firaxis-v208 and select
Compare to and then right-click on
jrayUGH-v208a and select
Compare:
-
This brings up WinMerge showing the differences:
Here's a summary of the diffs, which I created using
Tools -> Generate Report (which can make an HTML, XML, or text report):
The Enhanced Military Advisor consists of only 3 files. One of these (
CvScreensInterface.py) is a change to an existing Firaxis file, and the other two are new. I ascertained this by looking at
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Warlords\Assets
and then
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets
to see if the 3 files included in the Enhanced Military Advisor mod existed in the main game.
Let's zoom in on the one file that the Enhanced Military advisor changes,
CvScreensInterface.py (by double-clicking its entry in WinMerge):
Note how the Location Pane in the upper-left gives a visual summary of where the differences are. Let's scroll down to where I made the primary change for the Enhanced Military Advisor (which I figured out by using WinMerge to compare its
CvScreensInterface.py with Firaxis'
CvScreensInterface.py):
The attentive reader will note how I read in the
Use Enhanced Military Advisor option from the
jrayMilitaryAdvisor.ini file to decide whether to load the standard or enhanced advisor.
And that's all there was to it-- suddenly my mod had the Enhanced Military Advisor! Okay, I admit I'm doing a little hand-waving here... I did have to create
jrayMilitaryAdvisor.ini and incorporate Dr Elmer Jiggle's INI parser into my modpack first... but you get the idea
.
For brave souls who want to give WinMerge a whirl, below is an export of my configuration file. You might find it helpful to use as a starting point. (It's from version 2.6.2, which is current as of this post). Just copy the contents to a file (say,
myWinMerge.ini), open the
Edit -> Options dialog in WinMerge, press
Import, and locate the file.
If you want to edit files from within WinMerge that only exist on one side or the other, then I highly suggest getting a good text editor with syntax highlighting for Python, XML, and INI files. Then you can tell WinMerge to use it by updating
Edit -> Options -> System -> External Editor.
My favorite editor is
TextPad, which is nagware but very polite about it (only forcing you to see a splash screen for a few seconds).
You can download TextPad syntax highlighting add-ons for Python
here (get "Python (7)"), XML
here (get the first "Generic XML"), and INI files
here (get "INI").
Oh, and to be able to see files that exist on only one side, you'll need to change the
View -> Options in WinMerge. For example, you can enable
Show Left Unique Items,
Show Right Unique Items, etc.:
Good luck and happy tweaking!