Civ4ProjectInfo: Difference between revisions
(→Text) |
m (Unprotected "Civ4ProjectInfo") |
||
(2 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
==Tags== | ==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" | |||
|- | |||
! style="background:#efefef;" | Tag Name | |||
! style="background:#efefef;" | Description | |||
|- | |||
!ProjectInfo | |||
|Main bracket for each entry | |||
|- | |||
!Type | |||
|Label that is used throughout all other XML files | |||
|} | |||
===Prerequisites=== | ===Prerequisites=== | ||
Line 25: | Line 40: | ||
===Text=== | |||
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0" | |||
|- | |||
! style="background:#efefef;" | Tag Name | |||
! style="background:#efefef;" | Description | |||
|- | |||
!Description | |||
|References the Text which contains the project name. The text is specified in any of the Assets\XML\Text files. | |||
|- | |||
!Civilopedia | |||
|References the Text for the civilopedia content. The text is specified in any of the Assets\XML\Text files. | |||
|- | |||
!Strategy | |||
|References the Text for the strategy content. The text is specified in any of the Assets\XML\Text files. | |||
|} | |||
===Integers=== | ===Integers=== | ||
Line 123: | Line 154: | ||
===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 | |||
|- | |||
!Button | |||
|The path of the dds file with the image of this project. | |||
|- | |||
!MovieDefineTag | |||
|The movie to be shown to a human player when he completes the project. The possible values are defined in the Art\Civ4ArtDefines_Movie.xml file. | |||
|} | |||
===Miscellaneous=== | |||
Other types of tags. | |||
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0" | |||
|- | |||
! style="background:#efefef;" | Tag Name | |||
! style="background:#efefef;" | Description | |||
|- | |||
!CreateSound | |||
|The sound to be played to a human player when he completes the project. The possible values are defined in the Audio\Civ4Audio2DScripts.xml file. | |||
|- | |||
!EveryoneSpecialBuilding | |||
|Allows every player to build the specified type of special building. Special building types are defined in the Buildings\Civ4SpecialBuildingInfos.xml file. | |||
|- | |||
!EveryoneSpecialUnit | |||
|Allows every player to train the specified type of special unit. Special unit types are defined in the Units\Civ4SpecialUnitInfos.xml file. | |||
|} | |||
==Example== | ==Example== |
Latest revision as of 03:26, 3 October 2011
The Civ4ProjectInfo file contains all the information related to each project.
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 |
---|---|
ProjectInfo | Main bracket for each entry |
Type | Label that is used throughout all other XML files |
Prerequisites
These tags must be included when writing new entries, or the game will crash or otherwise malfunction.
Tag Name | Description |
---|---|
AnyonePrereqProject | Optional. Specifies wheter another project has already to be completed by anyone, in order to be able to build this project. The possible values are either NONE or another project defined in this xml file. |
VictoryPrereq | Specifies if a victory condition has to be enabled, in order to be able to build this project. The possible values are either NONE or the ones defined in the GameInfo\Civ4VictoryInfo file. |
Text
Tag Name | Description |
---|---|
Description | References the Text which contains the project name. The text is specified in any of the Assets\XML\Text files. |
Civilopedia | References the Text for the civilopedia content. The text is specified in any of the Assets\XML\Text files. |
Strategy | References the Text for the strategy content. 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 |
---|---|
iCost | The production cost of this project. If -1, the project cannot be directly built by a city. |
iMaxGlobalInstances | Specifies how many times this project can be completed globally in the world. If -1, there's no limit. |
iMaxTeamInstances | Specifies how many times this project can be completed by a given team. If -1, there's no limit. |
iNukeInterception | The chance this project has to intercept (and destroy) missiles dropped on your land. |
iSuccessRate | Specifies the failure chance of the project, for each missing istance from the value of VictoryThreshold. (e.g.: if the iSuccessRate is 20 and the VictoryThreshold is 5, if I build 3 times this project I still have a 40% chance of failure; if I reach 5, the failure chance is 0). |
iTechShare | Allows the project to give its owner all the techs discovered by at least "n" known civilizations. The value of "n" is specified in this tag. |
iVictoryDelayPercent | Affects how much a victory is delayed in time, when some istances of this project have not been completed yet (see the VictoryThresholds value). |
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 |
---|---|
bAllowsNukes | Specifies if this project allows every player to build nuclear weapons. |
bSpaceship | Specifies if this project is a spaceship part (considered for city production bonus and espionage missions). |
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 |
---|---|
BonusProductionModifiers | Specifies the city production modifier for this project, when a bonus resource is available. The possible values are defined in the Terrain\Civ4BonusInfos file.
<BonusProductionModifiers> <BonusProductionModifier> <BonusType>BONUS_ALUMINUM</BonusType> <iProductonModifier>100</iProductonModifier> </BonusProductionModifier> </BonusProductionModifiers> |
PrereqProjects | The projects that must be completed by the team, to be able to build this project.
<PrereqProjects> <PrereqProject> <ProjectType>PROJECT_APOLLO_PROGRAM</ProjectType> <iNeeded>1</iNeeded> </PrereqProject> </PrereqProjects> |
VictoryMinThresholds | Specifies how many times this project must be completed, to enable a victory condition. If it is not specified, the iMaxTeamInstances value is considered instead. The possible values are either NONE or the ones defined in the GameInfo\Civ4VictoryInfo file.
<VictoryMinThresholds> <VictoryMinThreshold> <VictoryType>VICTORY_SPACE_RACE</VictoryType> <iThreshold>1</iThreshold> </VictoryMinThreshold> </VictoryMinThresholds> |
VictoryThresholds | Affects the project success rate (see: iSuccessRate) and the delay rate (see: iVictoryDelayPercent). Indirectly, sets a project as a prerequisite for a given victory type. The possible values are either NONE or the ones defined in the GameInfo\Civ4VictoryInfo file.
<VictoryThresholds> <VictoryThreshold> <VictoryType>VICTORY_SPACE_RACE</VictoryType> <iThreshold>2</iThreshold> </VictoryThreshold> </VictoryThresholds> |
Art
These tags are directly related to the rendering of art for the entry.
Tag Name | Description |
---|---|
Button | The path of the dds file with the image of this project. |
MovieDefineTag | The movie to be shown to a human player when he completes the project. The possible values are defined in the Art\Civ4ArtDefines_Movie.xml file. |
Miscellaneous
Other types of tags.
Tag Name | Description |
---|---|
CreateSound | The sound to be played to a human player when he completes the project. The possible values are defined in the Audio\Civ4Audio2DScripts.xml file. |
EveryoneSpecialBuilding | Allows every player to build the specified type of special building. Special building types are defined in the Buildings\Civ4SpecialBuildingInfos.xml file. |
EveryoneSpecialUnit | Allows every player to train the specified type of special unit. Special unit types are defined in the Units\Civ4SpecialUnitInfos.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.
<ProjectInfo> <Type>PROJECT_MANHATTAN_PROJECT</Type> <Description>TXT_KEY_PROJECT_MANHATTAN_PROJECT</Description> <Civilopedia>TXT_KEY_PROJECT_MANHATTAN_PROJECT_PEDIA</Civilopedia> <Strategy>TXT_KEY_PROJECT_MANHATTAN_PROJECT_STRATEGY</Strategy> <VictoryPrereq>NONE</VictoryPrereq> <TechPrereq>TECH_FISSION</TechPrereq> <AnyonePrereqProject>NONE</AnyonePrereqProject> <iMaxGlobalInstances>1</iMaxGlobalInstances> <iMaxTeamInstances>-1</iMaxTeamInstances> <iCost>1500</iCost> <iNukeInterception>0</iNukeInterception> <iTechShare>0</iTechShare> <EveryoneSpecialUnit>NONE</EveryoneSpecialUnit> <EveryoneSpecialBuilding>SPECIALBUILDING_BOMB_SHELTER</EveryoneSpecialBuilding> <bSpaceship>0</bSpaceship> <bAllowsNukes>1</bAllowsNukes> <Button>,Art/Interface/Buttons/Buildings/ManhattanProject.dds,Art/Interface/Buttons/Buildings_Atlas.dds,7,4</Button> <PrereqProjects/> <VictoryThresholds/> <VictoryMinThresholds/> <iVictoryDelayPercent>0</iVictoryDelayPercent> <iSuccessRate>0</iSuccessRate> <BonusProductionModifiers> <BonusProductionModifier> <BonusType>BONUS_URANIUM</BonusType> <iProductonModifier>100</iProductonModifier> </BonusProductionModifier> </BonusProductionModifiers> <CreateSound/> <MovieDefineTag>ART_DEF_MOVIE_MANHATTAN_PROJECT</MovieDefineTag> </ProjectInfo>