New Leader Traits!

How do you change a leaders traits? Just wondering
 
You go to the CIV4LeaderHeadInfos.xml file in the Civilizations folder of the XML folder of the Assets folder (could be the assets folder of the main game, but it is probably better to do it in the assets folder of a mod), and in the <Traits></Traits> section you change the individual traits. You add as many traits as you want, provided the traits are already made.

If you want to add a new trait not included in the game, then you have to add it to the CIV4TraitInfos.xml file in the same folder. You can start by just copying an existing trait and making the changes from there.
 
I ve added a scientific leader trait into the game, there was something similar in Civ 3, don't know why they did not include it in Civ 4.
The bonus i added are :
+3 :science: / city.
Half production cost for library, university, laboratory.

The result is interesting. If someone is interested, i can post a link to the modified files.

Modifications in Civ4TraitInfos.xml :
<!-- BEGIN -->
<TraitInfo>
<Type>TRAIT_SCIENTIFIC</Type>
<Description>TXT_KEY_TRAIT_SCIENTIFIC</Description>
<ShortDescription>TXT_KEY_TRAIT_SCIENTIFIC_SHORT</ShortDescription>
<iHealth>0</iHealth>
<iHappiness>0</iHappiness>
<iMaxAnarchy>-1</iMaxAnarchy>
<iUpkeepModifier>0</iUpkeepModifier>
<iLevelExperienceModifier>0</iLevelExperienceModifier>
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
<iGreatGeneralRateModifier>0</iGreatGeneralRateModifier>
<iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier>
<iMaxGlobalBuildingProductionModifier>0</iMaxGlobalBuildingProductionModifier>
<iMaxTeamBuildingProductionModifier>0</iMaxTeamBuildingProductionModifier>
<iMaxPlayerBuildingProductionModifier>0</iMaxPlayerBuildingProductionModifier>
<ExtraYieldThresholds/>
<TradeYieldModifiers/>
<CommerceChanges>
<iCommerce>0</iCommerce>
<iCommerce>3</iCommerce>
<iCommerce>0</iCommerce>
</CommerceChanges>
<CommerceModifiers/>
<FreePromotions/>
<FreePromotionUnitCombats/>
</TraitInfo>
<!-- END -->


Also don't forget to modify the Civ4BuildingsInfos.xml to add the production bonus for the buildings :
...
<ProductionTraits>
<ProductionTrait>
<ProductionTraitType>TRAIT_SCIENTIFIC</ProductionTraitType>
<iProductionTrait>100</iProductionTrait>
</ProductionTrait>
</ProductionTraits>
...


And to add the proper text in the text files :
...
<TEXT>
<Tag>TXT_KEY_TRAIT_SCIENTIFIC</Tag>
<English>Scientific</English>
<French>
<Text>Scientifique</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</French>
<German>
<Text>Scientific</Text>
<Gender>Neuter</Gender>
<Plural>0</Plural>
</German>
<Italian>
<Text>Scientific</Text>
<Gender>Neuter</Gender>
<Plural>0</Plural>
</Italian>
<Spanish>
<Text>Scientific</Text>
<Gender>Neuter</Gender>
<Plural>0</Plural>
</Spanish>
</TEXT>
<TEXT>
<Tag>TXT_KEY_TRAIT_SCIENTIFIC_SHORT</Tag>
<English>Sci</English>
<French>
<Text>Sci</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</French>
<German>
<Text>Sci</Text>
<Gender>Neuter</Gender>
<Plural>0</Plural>
</German>
<Italian>
<Text>Sci</Text>
<Gender>Neuter</Gender>
<Plural>0</Plural>
</Italian>
<Spanish>
<Text>Sci</Text>
<Gender>Neuter</Gender>
<Plural>0</Plural>
</Spanish>
</TEXT>
...
 
Top Bottom