Civ4TechInfos: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 14: Line 14:
! style="background:#efefef;" | Description
! style="background:#efefef;" | Description
|-
|-
! TechInfos
! 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.
|-
|-
! TechInfo
! CivilizationInfo
| Encloses the entry for each civilization
| Encloses the entry for each civilization
|}
|}
Line 28: Line 28:
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
! style="background:#efefef;" | Description
|-
! Advisor
|
|-
! Button
|
|-
! Civilopedia
| References the Text which contains the civilopedia content for that civilization. The text is specified in any of the Assets\XML\Text files.
|-
! 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.
|-
! Era
|
|-
! FirstFreeUnitClass
|
|-
! Help
|
|-
! Quote
|
|-
! Sound
|
|-
! SoundMP
|
|-
! Strategy
|
|-
|-
! 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.
|}
===Integers===
All of these tags have a numerical value.  Though it sometimes can be negative, it usually is not.
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
|-
! Description
!iAITradeModifier
| 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.
|
|-
!iAIWeight
|
|-
!iAsset
|
|-
!iCost
|
|-
!iFeatureProductionModifier
|
|-
!iFirstFreeTechs
|
|-
!iGridX
|
|-
!iGridY
|
|-
!iHappiness
|
|-
!iHealth
|
|-
!iPower
|
|-
!iTradeRoutes
|
|-
|-
! Civilopedia
!iWorkerSpeedModifier
| References the Text which contains the civilopedia content for that civilization. The text is specified in any of the Assets\XML\Text files.
|
|}
|}


Line 49: Line 126:
! style="background:#efefef;" | Description
! style="background:#efefef;" | Description
|-
|-
! bPlayable
! bBridgeBuilding
| Specifies if a civilization can be played by a player (either human or AI). (0 for Minor and Barbarian, 1 for all the others.)
|
|-
! bDefensivePactTrading
|
|-
!bDisable
|
|-
|-
! bAIPlayable
! bExtraWaterSeeFrom
| Specifies if a civilization can be played by an AI player. (0 for Minor and Barbarian, 1 for all the others.)
|
|-
!bGoldTrading
|
|-
!bGoodyTech
|
|-
!bIgnoreIrrigation
|
|-
!bIrrigation
|
|-
!bMapCentering
|
|-
!bMapTrading
|
|-
!bMapVisible
|
|-
!bOpenBordersTrading
|
|-
!bPermanentAllianceTrading
|
|-
!bRepeat
|
|-
!bTechTrading
|
|-
!bTrade
|
|-
!bWaterWork
|
|}
|}


Line 66: Line 188:
! style="background:#efefef;" | Description
! style="background:#efefef;" | Description
|-
|-
! Cities
!AndPreReqs
| 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).
!DomainExtraMoves
 
|
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
!CommerceFlexible
| 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
!Flavors
| 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
!OrPreReqs
| 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
!SpecialBuilding
| 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
!TerrainTrades
| 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>
|}
|}



Revision as of 00:15, 24 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
Advisor
Button
Civilopedia References the Text which contains the civilopedia content for that civilization. The text is specified in any of the Assets\XML\Text files.
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.
Era
FirstFreeUnitClass
Help
Quote
Sound
SoundMP
Strategy
Type The name that can be used in other files and in the SDK to refer to a particular civilization.


Integers

All of these tags have a numerical value. Though it sometimes can be negative, it usually is not.

Tag Name Description
iAITradeModifier
iAIWeight
iAsset
iCost
iFeatureProductionModifier
iFirstFreeTechs
iGridX
iGridY
iHappiness
iHealth
iPower
iTradeRoutes
iWorkerSpeedModifier


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
bBridgeBuilding
bDefensivePactTrading
bDisable
bExtraWaterSeeFrom
bGoldTrading
bGoodyTech
bIgnoreIrrigation
bIrrigation
bMapCentering
bMapTrading
bMapVisible
bOpenBordersTrading
bPermanentAllianceTrading
bRepeat
bTechTrading
bTrade
bWaterWork


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
AndPreReqs
DomainExtraMoves
CommerceFlexible
Flavors
OrPreReqs
SpecialBuilding
TerrainTrades


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>