Civ4TraitInfos: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
No edit summary
m (Unprotected "Civ4TraitInfos")
 
(3 intermediate revisions by 2 users 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>


GlobalDefinesGlobalDefinesAltGlobalTypesPythonCallbackDefines

Art:

Civ4ArtDefines_BonusCiv4ArtDefines_BuildingCiv4ArtDefines_CivilizationCiv4ArtDefines_FeatureCiv4ArtDefines_ImprovementCiv4ArtDefines_InterfaceCiv4ArtDefines_LeaderheadCiv4ArtDefines_MiscCiv4ArtDefines_MovieCiv4ArtDefines_TerrainCiv4ArtDefines_UnitCiv4MainMenusCiv4RiverModelInfosCiv4RouteModelInfos

Audio; Buildings:

Audio2DScriptsAudio3DScriptsAudioDefinesAudioSoundscapeScriptsCiv4BuildingClassInfosCiv4BuildingInfosCiv4CityLSystemCiv4PlotLSystemCiv4SpecialBuildingInfos

BasicInfos:

Civ4AttitudeInfosCiv4BasicInfosCiv4CalendarInfosCiv4CityTabInfosCiv4DenialInfosCiv4DomainInfosCiv4InvisibleInfosCiv4MemoryInfosCiv4MonthInfosCiv4NewConceptInfosCiv4SeasonInfosCiv4UnitAIInfosCiv4UnitCombatInfos

Civilizations; Events:

Civ4CivilizationInfosCiv4LeaderHeadInfosCiv4TraitInfosCiv4UnitArtStyleTypeInfosCiv4EventInfosCiv4EventTriggerInfos

GameInfo:

Civ4CivicInfosCiv4CivicOptionInfosCiv4ClimateInfoCiv4CommerceInfoCiv4CorporationInfoCiv4CultureLevelInfoCiv4CursorInfoCiv4DiplomacyInfosCiv4EmphasizeInfosCiv4EspionageMissionInfoCiv4EraInfosCiv4ForceControlInfosCiv4GameOptionInfosCiv4GameSpeedInfoCiv4GoodyInfoCiv4GraphicOptionInfosCiv4HandicapInfoCiv4HintsCiv4MPOptionInfosCiv4PlayerOptionInfosCiv4ProcessInfoCiv4ReligionInfoCiv4SeaLevelInfoCiv4SpecialistInfosCiv4TurnTimerInfoCiv4UpKeepInfoCiv4VictoryInfoCiv4VoteInfoCiv4VoteSourceInfosCiv4WorldInfo

Interface:

Civ4AdvisorInfosCiv4CameraInfosCiv4ColorValsCiv4InterfaceModeInfosCiv4PlayerColorInfosCiv4SlideShowInfosCiv4SlideShowRandomInfosCiv4SpaceShipInfosCiv4ThroneRoomeInfosCiv4ThroneRoomCameraInfosCiv4ThroneRoomStyleInfosCiv4WorldPickerInfos

Misc:

Civ4AttachableInfosCiv4CameraOverlayInfosCiv4DetailManagerCiv4EffectInfosCiv4QuestInfosCiv4RiverInfosCiv4RouteInfosCiv4TerrainPlainInfosCiv4TutorialInfosCiv4WaterPlaneInfos

Technologies:

Civ4TechInfos

Terrain:

Civ4BonusClassInfosCiv4BonusInfosCiv4FeatureInfosCiv4ImprovementInfosCiv4SymbolMeshPathsCiv4TerrainInfosCiv4TerrainSettingsCiv4YieldInfos

Units:

Civ4AnimationInfosCiv4AnimationPathInfosCiv4AutomateInfosCiv4BuildInfosCiv4CommandInfosCiv4ControlInfosCiv4EntityEventInfosCiv4FormationInfosCiv4MissionInfosCiv4PromotionInfosCiv4SpecialUnitInfosCiv4UnitClassInfosCiv4UnitInfos

Schemas:

Civ4GlobalDefinesSchemaCiv4GlobalTypesSchemaCiv4ArtDefinesSchemaAudioDefinesSchemaAudioScriptSchemaCiv4BasicInfoSchemaCiv4BuildingSchemaCiv4LSystemSchemaCiv4CivilizationSchemaCiv4EventSchemaCiv4GameInfoSchemaCiv4InterfaceSchemaCiv4MiscSchemaCiv4TutorialSchemaCiv4DetailManagerSchemaCiv4TechnologiesSchemaCiv4TerrainSchemaCiv4FormationSchemaCiv4UnitSchema

Italics: Beyond the Sword only