How do I add a leader head?

Maxor127

Warlord
Joined
May 28, 2003
Messages
229
What should I do if I only want to add a new leader to an existing civilization with his own traits? I made my own leader head and I think I'd like to use it to add a second leader to the Romans with my own traits but keep everything else default.
 
The short version is:

Code:
[LIST=1]
[*]Copy CIV4CivilizationInfos.xml and CIV4LeaderHeadInfos.xml from X:\Program Files\Firaxis\Civilization 4\Assets\XML\Civilizations to My Documents\My Games\Civilization 4\CustomAssets\XML\Civilizations.
[*]Copy CIV4GameText_Civilopedia_CivLeaders.xml and CIV4GameTextInfos_Objects.xml from X:\Program Files\Firaxis\Civilization 4\Assets\XML\Text to My Documents\My Games\Civilization 4\CustomAssets\XML\Text
[*]Open CIV4LeaderHeadInfos.xml in notepad and do a search for the word "caesar".
[*]Copy everything from the opening <LeaderHeadInfo> tag just above that line to the closing tag </LeaderHeadInfo> for Julius Caesar.
[*]Go to the end of that document and paste that text in just above the closing tag </LeaderHeadInfos>
[*]In the section you just pasted in, change wherever it says LEADER_JULIUS_CAESAR to LEADER_XXX where XXX is the name of your new leader.  DON'T CHANGE THE ART TAG UNLESS YOU WANT TO ADD NEW LEADERHEAD ART AS WELL.
[*]In that new section, look for a tag <Traits> and change the trait tags to whatever traits you want your new leader to have.
[*]Save that file and open CIV4CivilizationInfos.xml.
[*]Do a search for "rome".
[*]Scroll down a little looking for the <Leaders> tag.  Copy the everything from <Leader> to </Leader> and paste that in as a second <Leader> segment within the <Leaders> section.  Change the name to match what you entered in CIV4LeaderHeadInfos.xml.
[*]Save that file and open CIV4GameText_Civilopedia_CivLeaders.xml.
[*]Go to the end of the file and copy one of the entries for a leader and paste it in.  Change the tag to match what you put in CIV4LeaderHeadInfos.xml for the <Civilopedia> tag.
[*]Change the civilopedia text to whatever you want it to be.  Be mindful of things like the tags Civ4 expects like H1, NEWLINE, PARAGRAPH:1, and TAB.  If you are going to release this as a mod, be nice and translate the text.
[*]Save this file and open CIV4GameTextInfos_Objects.xml.
[*]Search for "caesar".  Copy the segment for Caesar and paste it at the end.  Change the tag to match what you put in CIV4LeaderHeadInfos.xml.  Change the name to match your new leader.
[*]Save this file.[/LIST]

Technically you're now done. You should be able to load Civ4 and Rome will now have your new leader available. If you want to be complete about things, you should also add new leader head art (large and button), add new diplomacy text (so your new leader won't ask if you want some of his salad), change his AI settings, and make sure all of your text is translated into all 5 languages.

Unfortunately, it seems most modders who release new leaders/civs skip these last steps. Yes, I'm being critical but that's mainly because I end up having to do it myself just about every time I download a mod so that I'm not playing against (rediculous example coming) Bill Clinton who looks a lot like Julius Caesar, wants me to try his salad and for some reason acts like Montezuma on a bad day.
 
Maybe I should've waited for a reply before I started messing with things myself. I just started Civ4 to see if my changes worked. I saw an empty button for my leader (since I didn't add any graphics) but when I clicked on it, the game crashed. And when I went to Custom Game and looked for my leader there, it had a XML string for the name instead of the actual name. I'll go through your steps and see if I can't fix things.
 
That helped a lot, thanks. I completely missed one file, and I was editing the originals rather than copying them to the custom folders. Luckily I had backups because I knew I'd mess up. I'm still not sure of the proper way to add my own graphics and how to label them and link them to my leader. I also noticed in the Custom Game leader list, my leader's name isn't alphabetical. It starts with a C but is after Julius Caesar.
 
The game lists leaders in the order they exist in the CIV4LeaderHeadInfos.xml file.

As for the art, you can change the art tag in CIV4LeaderHeadInfos.xml and then add new entries to XML\Art\CIV4ArtDefines_Leaderhead.xml. Create both a new full size leader head graphic (512x512) and a button graphic (64x64). Replace the entries in XML\Art\CIV4ArtDefines_Leaderhead.xml... the Button tag should point to your button file (remove the bit about ...Atlas.dds) so it should look like this:

Code:
<Button>,Art/Interface/LeaderHeads/Btn_LH_xxx.dds</Button>

And point the NIF tag at your full size leaderhead static graphic. Don't worry about the other three tags (KFM, NoShaderNIF, BackgroundKFM) as these are ignored when you're using a static leaderhead graphic.
 
I managed to get my leader working. Everything looks good besides some slight graphic blemishes. I think the only thing I'd like to know now is how to replace the warrior the Romans start with with a scout. I never understood why an expansionist civ starts out with a warrior instead of a scout.
 
Back
Top Bottom