Hello. I have been lurking in the shadows and using this site as a reference while I've been constructing an ever-growing mod. I feel like I owe something to the boards, so I've been looking for a post I can answer, and, at long last, I've found one!
If you are new to modding, I'd suggest looking at one of the many "intro to modding" type posts before beginning. The most important thing is to not overwrite the original files in your Assets folder. Before doing anything, create a new sub folder in the Mods folder of your Civ 4 directory, which is probably located here:
Program Files\Firaxis Games\Sid Meier's Civilization 4\Mods
As you find files that you would like to modify, save a copy to your Mods\YourMod folder, being sure to preserve the exact file tree. For instance, if you are modifying an XML file located in Assets\XML\Buildings\, you would place your modified file in Mods\YourMod\Assets\XML\Buildings\.
You can edit XML files with a basic text editor - I use Crimson Editor (freeware - http://www.crimsoneditor.com/) for HTML, and find it works great for XML also. (Turn on Word Wrap and Line Numbers under the View menu for improved readability and navigation.) There are lots of XML syntax resources, so I'm not going to bother with that here.
OK, let's get going! Here are each of the files that pertain to the leader traits.
***Assets\XML\Buildings\CIV4BuildingInfos.xml
Use the <ProductionTraits> tag to specify which buildings are built at double speed for each trait. (View spoiler for code sample).
Spoiler:
For instance, this excerpt for a University shows that Philosophical leaders enjoy a 100% production increase for this building.
A building that offers no leader trait bonus would have this tag instead:
<ProductionTraits/>
***Assets\XML\Civilizations\CIV4LeaderHeadInfos.xml
Each leaders' traits are specified here in the <Traits> tag.
Spoiler:
Peter is both Philosophical and Expansive. Here is the code governing his traits:
<Traits>
<Trait>
<TraitType>TRAIT_PHILOSOPHICAL</TraitType>
<bTrait>1</bTrait>
</Trait>
<Trait>
<TraitType>TRAIT_EXPANSIVE</TraitType>
<bTrait>1</bTrait>
</Trait>
</Traits>
I've never tried removing traits from a leader, but that'd be an interesting way to cripple your least favorite leader opponent.
***Assets\XML\Civilizations\CIV4TraitInfos.xml
This file specifies the characteristics of each trait. The best way to understand the tags used here is to compare the leader trait description in the manual (p159) to each trait's code.
Spoiler:
Sticking with the Philosophical trait, we can see that the <iGreatPeopleRateModifier> tag imparts the +100% Great People Birth Rate effect.
If you are just tweaking existing traits, the files detailed above are the only files you need!
If you are adding new traits, you will need to create new entries in the files above (just copy and paste a complete set of code, change the trait name wherever it appears, and update the values). You will also need to edit the following two files:
***Assets\XML\Text\CIV4GameText_Misc1.xml
Use this file to edit or define the short text key for a trait. The <ShortDescription> tag in the CIV4TraitInfos.xml file refers to this file - this is what text shows up when the short description is called in-game.
***Assets\XML\Text\CIV4GameTextInfos_Objects.xml
Use this file to edit or define the normal text key for a trait. The <Description> tag in the CIV4TraitInfos.xml file refers to this file - this is what text shows up when the description is called in-game.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.