Difference between revisions of "Civ4TechInfos"

From Civilization Modding Wiki
Jump to: navigation, search
Line 1: Line 1:
Tags are either text tags (no prefix; they should contain letters), boolean (prefixed by a b, can be 1 [on] or 0 [off]) or integer (prefixed by i, containing numbers)
+
The '''Civ4TechInfos''' file defines all of the information, basic and complex, about each of the game's technologies.  Information in this file includes a tech's prerequisites, research cost, and benefits.
  
{| class="wikitable" border="1" style="text-align:left" cellpadding="5"
+
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.
 +
 
 +
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
 
|-
 
|-
! Tag !! Usage !! Default values
+
! style="background:#efefef;" | Tag Name
 +
! style="background:#efefef;" | Description
 
|-
 
|-
 
! CivilizationInfos
 
! CivilizationInfos
 
| This begins and ends the file. Everything must go in between these two, or it will not work.
 
| This begins and ends the file. Everything must go in between these two, or it will not work.
|
 
 
|-
 
|-
 
! CivilizationInfo
 
! CivilizationInfo
 
| Encloses the entry for each civilization
 
| Encloses the entry for each civilization
|
+
|}
 +
 
 +
 
 +
===Text===
 +
 
 +
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
 +
|-
 +
! style="background:#efefef;" | Tag Name
 +
! style="background:#efefef;" | Description
 
|-
 
|-
 
! Type
 
! Type
 
| The name that can be used in other files and in the SDK to refer to a particular civilization.
 
| The name that can be used in other files and in the SDK to refer to a particular civilization.
|
 
 
|-
 
|-
 
! Description
 
! Description
 
| References the Text which contains the civilization description (eg: "American empire", or "English empire"). The text is specified in any of the Assets\XML\Text files.
 
| References the Text which contains the civilization description (eg: "American empire", or "English empire"). The text is specified in any of the Assets\XML\Text files.
|
 
|-
 
! ShortDescription
 
| References the Text which contains the civilization short description (eg: "America", or "England"). The text is specified in any of the Assets\XML\Text files.
 
|
 
|-
 
! Adjective
 
| References the Text which contains the civilization adjective (eg: "American", or "English"). The text is specified in any of the Assets\XML\Text files.
 
|
 
 
|-
 
|-
 
! Civilopedia
 
! Civilopedia
 
| References the Text which contains the civilopedia content for that civilization. The text is specified in any of the Assets\XML\Text files.
 
| References the Text which contains the civilopedia content for that civilization. The text is specified in any of the Assets\XML\Text files.
|
+
|}
|-
+
 
! DefaultPlayerColor
+
 
| References the default color for that civilization, in the game. The possible values are defined in the Assets\XML\Interface\CIV4PlayerColorInfos.xml file.
+
===Boolean===
|
+
 
|-
+
All of these can either be 1 (on, or true) or 0 (off, or false). Be careful, as you can wind up with a double-negative, which the game will interpret as "True".
! ArtDefineTag
+
 
| Reference the graphic set to be used for that civilization (his symbol and his flag). The possible values are defined in the Assets\XML\Art\CIV4ArtDefines_Civilization.xml file.
+
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|
 
|-
 
! ArtStyleType
 
| Sets the art style for that civilization. This is used when displaying cities, and allows, for example, China and Japan to be displayed as asiatic, while Egypt and Mali will be displayed as african. The possible values are defined in the Assets\XML\GlobalTypes.xml file, in the section "ArtStyleTypes".
 
|  
 
 
|-
 
|-
! UnitArtStyleType
+
! style="background:#efefef;" | Tag Name
| Sets the art style for that civilization. This is used when displaying units, and allows, for example, China and Japan to be displayed as asiatic, while Egypt and Mali will be displayed as african. The possible values are defined in the Assets\XML\Civilizations\CIV4UnitArtStyleTypeInfos.xml file.
+
! style="background:#efefef;" | Description
|  
 
 
|-
 
|-
 
! bPlayable
 
! bPlayable
| Specifies if a civilization can be played by a player (either human or AI).
+
| Specifies if a civilization can be played by a player (either human or AI). (0 for Minor and Barbarian, 1 for all the others.)
| 0 for Minor and Barbarian, 1 for all the others.
 
 
|-
 
|-
 
! bAIPlayable
 
! bAIPlayable
| Specifies if a civilization can be played by an AI player.
+
| Specifies if a civilization can be played by an AI player. (0 for Minor and Barbarian, 1 for all the others.)
| 0 for Minor and Barbarian, 1 for all the others.  
+
|}
 +
 
 +
 
 +
===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).
 +
 
 +
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
 +
|-
 +
! style="background:#efefef;" | Tag Name
 +
! style="background:#efefef;" | Description
 
|-
 
|-
 
! Cities
 
! Cities
Line 70: Line 79:
 
:<City>TXT_KEY_CITY_NAME_WASHINGTON</City>
 
:<City>TXT_KEY_CITY_NAME_WASHINGTON</City>
  
|
 
 
|-
 
|-
 
! Buildings
 
! Buildings
Line 85: Line 93:
 
:</Building>
 
:</Building>
  
|
 
 
|-
 
|-
 
! Units
 
! Units
Line 100: Line 107:
 
:</Unit>
 
:</Unit>
  
|
 
 
|-
 
|-
 
! FreeUnitClasses
 
! FreeUnitClasses
Line 115: Line 121:
 
:</FreeUnitClass>
 
:</FreeUnitClass>
  
|
 
 
|-
 
|-
 
! FreeBuildingClasses
 
! FreeBuildingClasses
Line 130: Line 135:
 
:</FreeBuildingClass>
 
:</FreeBuildingClass>
  
|
 
 
|-
 
|-
 
! FreeTechs
 
! FreeTechs
Line 152: Line 156:
  
 
:</FreeTech>
 
:</FreeTech>
 +
|}
 +
 +
 +
===Art===
  
|  
+
These tags are directly related to the rendering of art for the entry.
 +
 
 +
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
 +
|-
 +
! style="background:#efefef;" | Tag Name
 +
! style="background:#efefef;" | Description
 +
|-
 +
! ArtDefineTag
 +
| Reference the graphic set to be used for that civilization (his symbol and his flag). The possible values are defined in the Assets\XML\Art\CIV4ArtDefines_Civilization.xml file.
 +
|-
 +
! ArtStyleType
 +
| Sets the art style for that civilization. This is used when displaying cities, and allows, for example, China and Japan to be displayed as asiatic, while Egypt and Mali will be displayed as african. The possible values are defined in the Assets\XML\GlobalTypes.xml file, in the section "ArtStyleTypes".
 
|-
 
|-
 +
! UnitArtStyleType
 +
| Sets the art style for that civilization. This is used when displaying units, and allows, for example, China and Japan to be displayed as asiatic, while Egypt and Mali will be displayed as african. The possible values are defined in the Assets\XML\Civilizations\CIV4UnitArtStyleTypeInfos.xml file.
 
|}
 
|}
 +
 +
 +
==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.
 +
 +
<TechInfos>
 +
  <TechInfo>
 +
  <Type>TECH_MYSTICISM</Type>
 +
  <Description>TXT_KEY_TECH_MYSTICISM</Description>
 +
  <Civilopedia>TXT_KEY_TECH_MYSTICISM_PEDIA</Civilopedia>
 +
  <Help/>
 +
  <Strategy>TXT_KEY_TECH_MYSTICISM_STRATEGY</Strategy>
 +
  <Advisor>ADVISOR_RELIGION</Advisor>
 +
  <iAIWeight>0</iAIWeight>
 +
  <iAITradeModifier>0</iAITradeModifier>
 +
  <iCost>50</iCost>
 +
  <iAdvancedStartCost>100</iAdvancedStartCost>
 +
  <iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
 +
  <Era>ERA_ANCIENT</Era>
 +
  <FirstFreeUnitClass>NONE</FirstFreeUnitClass>
 +
  <iFeatureProductionModifier>0</iFeatureProductionModifier>
 +
  <iWorkerSpeedModifier>0</iWorkerSpeedModifier>
 +
  <iTradeRoutes>0</iTradeRoutes>
 +
  <iHealth>0</iHealth>
 +
  <iHappiness>0</iHappiness>
 +
  <iFirstFreeTechs>0</iFirstFreeTechs>
 +
  <iAsset>8</iAsset>
 +
  <iPower>0</iPower>
 +
  <bRepeat>0</bRepeat>
 +
  <bTrade>1</bTrade>
 +
  <bDisable>0</bDisable>
 +
  <bGoodyTech>1</bGoodyTech>
 +
  <bExtraWaterSeeFrom>0</bExtraWaterSeeFrom>
 +
  <bMapCentering>0</bMapCentering>
 +
  <bMapVisible>0</bMapVisible>
 +
  <bMapTrading>0</bMapTrading>
 +
  <bTechTrading>0</bTechTrading>
 +
  <bGoldTrading>0</bGoldTrading>
 +
  <bOpenBordersTrading>0</bOpenBordersTrading>
 +
  <bDefensivePactTrading>0</bDefensivePactTrading>
 +
  <bPermanentAllianceTrading>0</bPermanentAllianceTrading>
 +
  <bVassalTrading>0</bVassalTrading>
 +
  <bBridgeBuilding>0</bBridgeBuilding>
 +
  <bIrrigation>0</bIrrigation>
 +
  <bIgnoreIrrigation>0</bIgnoreIrrigation>
 +
  <bWaterWork>0</bWaterWork>
 +
  <iGridX>1</iGridX>
 +
  <iGridY>11</iGridY>
 +
  <DomainExtraMoves/>
 +
  <CommerceFlexible/>
 +
  <TerrainTrades/>
 +
  <bRiverTrade>0</bRiverTrade>
 +
  <Flavors>
 +
    <Flavor>
 +
    <FlavorType>FLAVOR_RELIGION</FlavorType>
 +
    <iFlavor>9</iFlavor>
 +
    </Flavor>
 +
    <Flavor>
 +
    <FlavorType>FLAVOR_GOLD</FlavorType>
 +
    <iFlavor>1</iFlavor>
 +
    </Flavor>
 +
    <Flavor>
 +
    <FlavorType>FLAVOR_CULTURE</FlavorType>
 +
    <iFlavor>8</iFlavor>
 +
    </Flavor>
 +
    <Flavor>
 +
    <FlavorType>FLAVOR_GROWTH</FlavorType>
 +
    <iFlavor>2</iFlavor>
 +
    </Flavor>
 +
  </Flavors>
 +
  <OrPreReqs/>
 +
  <AndPreReqs/>
 +
  <Quote>TXT_KEY_TECH_MYSTICISM_QUOTE</Quote>
 +
  <Sound>AS2D_TECH_MYSTICISM</Sound>
 +
  <SoundMP>AS2D_TECH_MP_MYSTICISM</SoundMP>
 +
  <Button>,Art/Interface/Buttons/TechTree/Mysticism.dds,Art/Interface/Buttons/TechTree_Atlas.dds,4,11</Button>
 +
  </TechInfo>
 +
</TechInfos>

Revision as of 21:54, 23 May 2009

The Civ4TechInfos file defines all of the information, basic and complex, about each of the game's technologies. Information in this file includes a tech's prerequisites, research cost, and benefits.

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
CivilizationInfos This begins and ends the file. Everything must go in between these two, or it will not work.
CivilizationInfo Encloses the entry for each civilization


Text

Tag Name Description
Type The name that can be used in other files and in the SDK to refer to a particular civilization.
Description References the Text which contains the civilization description (eg: "American empire", or "English empire"). The text is specified in any of the Assets\XML\Text files.
Civilopedia References the Text which contains the civilopedia content for that civilization. The text is specified in any of the Assets\XML\Text files.


Boolean

All of these can either be 1 (on, or true) or 0 (off, or false). Be careful, as you can wind up with a double-negative, which the game will interpret as "True".

Tag Name Description
bPlayable Specifies if a civilization can be played by a player (either human or AI). (0 for Minor and Barbarian, 1 for all the others.)
bAIPlayable Specifies if a civilization can be played by an AI player. (0 for Minor and Barbarian, 1 for all the others.)


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
Cities The list of city names to be used for that civilization. The names will be available in the specified order (for non barbarian civilizations) or in a random order (for barbarian cities).

Each node may specify the name of the city (with no language traduction allowed), or a reference to a text defined in any of the Assets\XML\Text files (with language traduction allowed).

Example for an entry which specifies the name of the city:

<City>Washington</City>

Example for an entry which refers a defined text:

<City>TXT_KEY_CITY_NAME_WASHINGTON</City>
Buildings Specifies if a civilization uses unique buildings. It contains a list of Building Classes, and the correspondant Buildings enabled for that civilization. The possible values are defined: for Building Classes in the Assets\XML\Buildings\CIV4BuildingClassInfos.xml file, for Building Types in the Assets\XML\Buildings\CIV4BuildingInfos.xml file.

Example of unique building. Here, the American Mall is used instead of the standard Supermarket building class.

<Building>
<BuildingClassType>BUILDINGCLASS_SUPERMARKET</BuildingClassType>
<BuildingType>BUILDING_AMERICAN_MALL</BuildingType>
</Building>
Units Specifies if a civilization uses unique units. It contains a list of Unit Classes, and the correspondant Units enabled for that civilization. The possible values are defined: for Unit Classes in the Assets\XML\Units\CIV4UnitClassInfos.xml file, for Unit Types in the Assets\XML\Units\CIV4UnitInfos.xml file.

Example of unique unit. Here, the Navy Seal is used instead of the standard Marine unit class.

<Unit>
<UnitClassType>UNITCLASS_MARINE</UnitClassType>
<UnitType>UNIT_AMERICAN_NAVY_SEAL</UnitType>
</Unit>
FreeUnitClasses Specifies how many units a civilization starts with, and their types. It contains a list of unit classes, and a number for each of them. The possible values for unit classes are defined in the Assets\XML\Units\CIV4UnitClassInfos.xml file.

Example. This allows a civilization to start with 1 free settler.

<FreeUnitClass>
<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
<iFreeUnits>1</iFreeUnits>
</FreeUnitClass>
FreeBuildingClasses Specifies how many buildings a civilization starts with, and their type. The possible values for building classes are defined in the Assets\XML\Buildings\CIV4BuildingClassInfos.xml file.

Example. This allows a civilization to have a free Palace in his capital.

<FreeBuildingClass>
<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
<bFreeBuildingClass>1</bFreeBuildingClass>
</FreeBuildingClass>
FreeTechs Specifies how many techs a civilization starts with, and their type. The possible values for techs are defined in the Assets\XML\Technologies\CIV4TechInfos.xml file.

Example. This allows a civilization to start the game with two techs: fishing and agriculture.

<FreeTech>
<TechType>TECH_FISHING</TechType>
<bFreeTech>1</bFreeTech>
</FreeTech>
<FreeTech>
<TechType>TECH_AGRICULTURE</TechType>
<bFreeTech>1</bFreeTech>
</FreeTech>


Art

These tags are directly related to the rendering of art for the entry.

Tag Name Description
ArtDefineTag Reference the graphic set to be used for that civilization (his symbol and his flag). The possible values are defined in the Assets\XML\Art\CIV4ArtDefines_Civilization.xml file.
ArtStyleType Sets the art style for that civilization. This is used when displaying cities, and allows, for example, China and Japan to be displayed as asiatic, while Egypt and Mali will be displayed as african. The possible values are defined in the Assets\XML\GlobalTypes.xml file, in the section "ArtStyleTypes".
UnitArtStyleType Sets the art style for that civilization. This is used when displaying units, and allows, for example, China and Japan to be displayed as asiatic, while Egypt and Mali will be displayed as african. The possible values are defined in the Assets\XML\Civilizations\CIV4UnitArtStyleTypeInfos.xml file.


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.

<TechInfos>
 <TechInfo>
  <Type>TECH_MYSTICISM</Type>
  <Description>TXT_KEY_TECH_MYSTICISM</Description>
  <Civilopedia>TXT_KEY_TECH_MYSTICISM_PEDIA</Civilopedia>
  <Help/>
  <Strategy>TXT_KEY_TECH_MYSTICISM_STRATEGY</Strategy>
  <Advisor>ADVISOR_RELIGION</Advisor>
  <iAIWeight>0</iAIWeight>
  <iAITradeModifier>0</iAITradeModifier>
  <iCost>50</iCost>
  <iAdvancedStartCost>100</iAdvancedStartCost>
  <iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
  <Era>ERA_ANCIENT</Era>
  <FirstFreeUnitClass>NONE</FirstFreeUnitClass>
  <iFeatureProductionModifier>0</iFeatureProductionModifier>
  <iWorkerSpeedModifier>0</iWorkerSpeedModifier>
  <iTradeRoutes>0</iTradeRoutes>
  <iHealth>0</iHealth>
  <iHappiness>0</iHappiness>
  <iFirstFreeTechs>0</iFirstFreeTechs>
  <iAsset>8</iAsset>
  <iPower>0</iPower>
  <bRepeat>0</bRepeat>
  <bTrade>1</bTrade>
  <bDisable>0</bDisable>
  <bGoodyTech>1</bGoodyTech>
  <bExtraWaterSeeFrom>0</bExtraWaterSeeFrom>
  <bMapCentering>0</bMapCentering>
  <bMapVisible>0</bMapVisible>
  <bMapTrading>0</bMapTrading>
  <bTechTrading>0</bTechTrading>
  <bGoldTrading>0</bGoldTrading>
  <bOpenBordersTrading>0</bOpenBordersTrading>
  <bDefensivePactTrading>0</bDefensivePactTrading>
  <bPermanentAllianceTrading>0</bPermanentAllianceTrading>
  <bVassalTrading>0</bVassalTrading>
  <bBridgeBuilding>0</bBridgeBuilding>
  <bIrrigation>0</bIrrigation>
  <bIgnoreIrrigation>0</bIgnoreIrrigation>
  <bWaterWork>0</bWaterWork>
  <iGridX>1</iGridX>
  <iGridY>11</iGridY>
  <DomainExtraMoves/>
  <CommerceFlexible/>
  <TerrainTrades/>
  <bRiverTrade>0</bRiverTrade>
  <Flavors>
   <Flavor>
    <FlavorType>FLAVOR_RELIGION</FlavorType>
    <iFlavor>9</iFlavor>
   </Flavor>
   <Flavor>
    <FlavorType>FLAVOR_GOLD</FlavorType>
    <iFlavor>1</iFlavor>
   </Flavor>
   <Flavor>
    <FlavorType>FLAVOR_CULTURE</FlavorType>
    <iFlavor>8</iFlavor>
   </Flavor>
   <Flavor>
    <FlavorType>FLAVOR_GROWTH</FlavorType>
    <iFlavor>2</iFlavor>
   </Flavor>
  </Flavors>
  <OrPreReqs/>
  <AndPreReqs/>
  <Quote>TXT_KEY_TECH_MYSTICISM_QUOTE</Quote>
  <Sound>AS2D_TECH_MYSTICISM</Sound>
  <SoundMP>AS2D_TECH_MP_MYSTICISM</SoundMP>
  <Button>,Art/Interface/Buttons/TechTree/Mysticism.dds,Art/Interface/Buttons/TechTree_Atlas.dds,4,11</Button>
 </TechInfo>
</TechInfos>