Civ4ProjectInfo: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
No edit summary
m (Unprotected "Civ4ProjectInfo")
 
(One intermediate revision by the same user not shown)
(No difference)

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>


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