Civ4TraitInfos: Difference between revisions
m (Reverted edits by 61.186.185.252 (Talk) to last version by Ginger Ale) |
m (Unprotected "Civ4TraitInfos") |
(One intermediate revision by the same user not shown) | |
(No difference)
|
Latest revision as of 01:37, 3 October 2011
The Civ4TraitInfos file contains all the information related to each leader trait.
All tags must be opened and closed; the first is the "open", the second the "close" tag. If nothing goes inside a "list tag", then it should just be the opening tag with a "/" before the closing bracket. The following tables contain all available tags, as well as their purpose and accepted values.
Tags
Headers
These tags typically bracket other tags, sometimes the entire file, and are generally used to specify more than one piece of data.
Tag Name | Description |
---|---|
TraitInfo | Main bracket for each entry |
Type | Label that is used throughout all other XML files |
Text
Tag Name | Description |
---|---|
Description | References the Text which contains the trait description (eg: "Industrious"). The text is specified in any of the Assets\XML\Text files. |
Help | Optional. A text that can include some more information to display. The text is specified in any of the Assets\XML\Text files. |
ShortDescription | References the Text which contains the trait short description (eg: "Ind" for industrious). The text is specified in any of the Assets\XML\Text files. |
Integers
All of these tags have a numerical value. Though it sometimes can be negative, it usually is not.
Tag Name | Description |
---|---|
iDomesticGreatGeneralRateModifier | Modifies the production of Great General points within your borders. |
iGreatGeneralRateModifier | Modifies the production of Great General points. |
iGreatPeopleRateModifier | Modifies the production of Great People points in every city. |
iHealth | Specifies the extra health for each city. |
iHappiness | Specifies the extra happiness for each city. |
iLevelExperienceModifier | Modifies the required experience points per promotion (in percent). |
iMaxAnarchy | Specify the anarchy maximum length. If -1, there is no limit. If 0, there is no anarchy between switches. |
iMaxGlobalBuildingProductionModifier | Modifies the production for world wonders. |
iMaxPlayerBuildingProductionModifier | Modifies the production for national wonders. |
iMaxTeamBuildingProductionModifier | Modifies the production for team wonders. |
iUpkeepModifier | How much civic maintainance costs are reduced (in percent). |
Lists (Multi-line)
All List tags consist of an opening/closing tag, which is shown here, and then each entry within it is another tag with the same name as the parent tag, minus the "s" (i.e. singular, rather than plural).
Tag Name | Description |
---|---|
CommerceChanges | Specifies the extra commerce for each city (the values are, respectively, gold, research, culture, espionage)
<CommerceChanges> <iCommerce>0</iCommerce> <iCommerce>0</iCommerce> <iCommerce>2</iCommerce> </CommerceChanges> |
CommerceModifiers | The commerce modifier (in percent) for each city (the values are, respectively, gold, research, culture, espionage)
<CommerceModifiers> <iCommerce>0</iCommerce> <iCommerce>25</iCommerce> <iCommerce>0</iCommerce> </CommerceModifiers> |
ExtraYieldThresholds | Provides 1 extra yield in each tile which produces at least the specified amount (the values are, respectively, food, production, commerce)
<ExtraYieldThresholds> <iExtraYieldThreshold>0</iExtraYieldThreshold> <iExtraYieldThreshold>0</iExtraYieldThreshold> <iExtraYieldThreshold>2</iExtraYieldThreshold> </ExtraYieldThresholds> |
FreePromotions | The promotions that will be given to every new unit whose type is specified in the 'FreePromotionUnitCombats' list. The possible values are defined in the Units\CIV4PromotionInfos.xml file.
<FreePromotions> <FreePromotion> <PromotionType>PROMOTION_COMBAT1</PromotionType> <bFreePromotion>1</bFreePromotion> </FreePromotion> </FreePromotions> |
FreePromotionUnitCombats | The unit types that will be given the promotions specified in the 'FreePromotions' list. The possible values are defined in the CvBasicInfos.xml, in the section 'UnitCombatInfos'.
<FreePromotionUnitCombats> <FreePromotionUnitCombat> <UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType> <bFreePromotionUnitCombat>1</bFreePromotionUnitCombat> </FreePromotionUnitCombat> <FreePromotionUnitCombat> <UnitCombatType>UNITCOMBAT_GUN</UnitCombatType> <bFreePromotionUnitCombat>1</bFreePromotionUnitCombat> </FreePromotionUnitCombat> </FreePromotionUnitCombats> |
TradeYieldModifiers | Given a trade profit value, provides extra yield for each trade route (in percent) (the values are, respectively, food, production, commerce)
<TradeYieldModifiers> <iYield>0</iYield> <iYield>50</iYield> <iYield>0</iYield> </TradeYieldModifiers> |
Example
In the following example of code, please note that there is a specific order of all of the tags. You must list the tags in this order for the game to properly interpret your file.
<TraitInfo> <Type>TRAIT_PHILOSOPHICAL</Type> <Description>TXT_KEY_TRAIT_PHILOSOPHICAL</Description> <ShortDescription>TXT_KEY_TRAIT_PHILOSOPHICAL_SHORT</ShortDescription> <iHealth>0</iHealth> <iHappiness>0</iHappiness> <iMaxAnarchy>-1</iMaxAnarchy> <iUpkeepModifier>0</iUpkeepModifier> <iLevelExperienceModifier>0</iLevelExperienceModifier> <iGreatPeopleRateModifier>100</iGreatPeopleRateModifier> <iGreatGeneralRateModifier>0</iGreatGeneralRateModifier> <iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier> <iMaxGlobalBuildingProductionModifier>0</iMaxGlobalBuildingProductionModifier> <iMaxTeamBuildingProductionModifier>0</iMaxTeamBuildingProductionModifier> <iMaxPlayerBuildingProductionModifier>0</iMaxPlayerBuildingProductionModifier> <ExtraYieldThresholds/> <TradeYieldModifiers/> <CommerceChanges/> <CommerceModifiers/> <FreePromotions/> <FreePromotionUnitCombats/> </TraitInfo>