Civ4BuildInfos: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
(Created page with 'The '''Civ4BuildInfos''' file describes the various terrain improvements available for workers, work boats, and others. All tags must be opened and closed; the first is the "ope...')
 
No edit summary
Line 2: Line 2:


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.  
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.  
<font color=red>This page is missing information.
Do not remove this notice until it is complete.</font>




Line 37: Line 34:
!Description
!Description
|A reference to the text files, which contain an entry for this build option.
|A reference to the text files, which contain an entry for this build option.
|-
!Help
|Any additional text used for the build; for example, the Final Frontier mod's starbase build.
|-
|-
!PrereqTech
!PrereqTech
Line 45: Line 45:
|-
|-
!RouteType
!RouteType
|The in-game reference to the type of route provided by this build, as described in the Civ4RouteInfos file.
|The in-game reference to the type of route provided by this build, as described in the Civ4RouteInfos file.  Used for roads and railroads.
|-
|-
!EntityEvent
!EntityEvent
Line 68: Line 68:
|-
|-
!iTime
!iTime
|The number of turns it takes to complete the improvement, times 100.  That is, a value of 600 means the improvement requires 6 turns of action.
|The number of turns it takes to complete the improvement, times 100.  That is, a value of 600 means the improvement requires 6 turns of action.  Note: this is only true for the default worker.  Units with a different work rate will work differently.  The turns it takes is actually iTime / iWorkRate (in [[Civ4UnitInfos]]).
|-
|-
!iCost
!iCost
Line 77: Line 77:
|-
|-
!iProduction
!iProduction
|The amount of hammers provided after this build is completed.
|The amount of hammers provided to the nearest city after this build is completed; used with the FeatureStructs tags.
|}
|}


Line 115: Line 115:
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
! style="background:#efefef;" | Description
|-
!Help
|Unknown.  Presumably used for text file entries, but left blank for all default builds.
|-
|-
!FeatureStructs
!FeatureStructs
|Used when improvements can be built on terrain overlays, like forests or jungleFor more, see the example code.
|Any features that will be removed with the completion of the build.
  <FeatureStruct>
  <FeatureType>FEATURE_FOREST</FeatureType>
  <PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
  <iTime>300</iTime>
  <iProduction>30</iProduction>
  <bRemove>1</bRemove>
</FeatureStruct>
|}
|}


Line 134: Line 138:
|-
|-
!Button
!Button
|References to the build button displayed in the bottom middle of the screen and a second unknown image.
|References to the build button displayed in the bottom middle of the screen.
|}
|}



Revision as of 18:24, 10 July 2009

The Civ4BuildInfos file describes the various terrain improvements available for workers, work boats, and others.

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
BuildInfos Begins and ends the entire file. Contains various BuildInfo entries.
BuildInfo Contains the information for each terrain improvement.


Text

Tag Name Description
Type The internal name of this build improvement option.
Description A reference to the text files, which contain an entry for this build option.
Help Any additional text used for the build; for example, the Final Frontier mod's starbase build.
PrereqTech The technology required for this improvement.
ImprovementType The name of the terrain improvement (i.e. farm, mine, whaling boats, etc. Roads and railroads have the value of NONE.)
RouteType The in-game reference to the type of route provided by this build, as described in the Civ4RouteInfos file. Used for roads and railroads.
EntityEvent This describes the graphics displayed while this build is being constructed (e.g. a worker using a shovel).
HotKey Describes the keyboard shortcut for this build. For example, a road has the value of KB_R (KB = keyboard).
FeatureType Used with the FeatureStructs tag to create terrain-specific information.


Integers

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

Tag Name Description
iTime The number of turns it takes to complete the improvement, times 100. That is, a value of 600 means the improvement requires 6 turns of action. Note: this is only true for the default worker. Units with a different work rate will work differently. The turns it takes is actually iTime / iWorkRate (in Civ4UnitInfos).
iCost The gold cost for this improvement (i.e. can be used to draw money from the treasury to pay for improvements).
iHotKeyPriority If multiple builds have the same hot key shortcut, the build with a value of 1 for this tag is chosen to be constructed.
iProduction The amount of hammers provided to the nearest city after this build is completed; used with the FeatureStructs tags.


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
bKill If 1, the unit constructing the improvement dies (used for fishing boats, whaling boats, etc.).
bAltDown If 1, the keyboard shortcut requires the Alt key.
bShiftDown If 1, the keyboard shortcut requires the Shift key.
bCtrlDown If 1, the keyboard shortcut requires the Control key.
bRemove If 1, removes the terrain feature after completion (i.e. chopping a forest).


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
FeatureStructs Any features that will be removed with the completion of the build.
<FeatureStruct>
 <FeatureType>FEATURE_FOREST</FeatureType>
 <PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
 <iTime>300</iTime>
 <iProduction>30</iProduction>
 <bRemove>1</bRemove>
</FeatureStruct>


Art

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

Tag Name Description
Button References to the build button displayed in the bottom middle of the screen.


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.

<BuildInfos>
 <BuildInfo>
  <Type>BUILD_WINERY</Type>
  <Description>TXT_KEY_BUILD_WINERY</Description>
  <Help/>
  <PrereqTech>TECH_MONARCHY</PrereqTech>
  <iTime>500</iTime>
  <iCost>0</iCost>
  <bKill>0</bKill>
  <ImprovementType>IMPROVEMENT_WINERY</ImprovementType>
  <RouteType>NONE</RouteType>
  <EntityEvent>ENTITY_EVENT_BUILD</EntityEvent>
  <FeatureStructs>
   <FeatureStruct>
    <FeatureType>FEATURE_JUNGLE</FeatureType>
    <PrereqTech>TECH_IRON_WORKING</PrereqTech>
    <iTime>400</iTime>
    <iProduction>0</iProduction>
    <bRemove>1</bRemove>
   </FeatureStruct>
   <FeatureStruct>
    <FeatureType>FEATURE_FOREST</FeatureType>
    <PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
    <iTime>300</iTime>
    <iProduction>30</iProduction>
    <bRemove>1</bRemove>
   </FeatureStruct>
  </FeatureStructs>
  <HotKey>KB_W</HotKey>
  <bAltDown>0</bAltDown>
  <bShiftDown>1</bShiftDown>
  <bCtrlDown>0</bCtrlDown>
  <iHotKeyPriority>1</iHotKeyPriority>
  <Button>,Art/Interface/Buttons/Builds/BuildWinery.dds,Art/Interface/Buttons/Actions_Builds_LeaderHeads_Specialists_Atlas.dds,6,8</Button>
 </BuildInfo>
</BuildInfos>


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