Civ4ImprovementInfos: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
No edit summary
Line 56: Line 56:
!iDefenseModifier
!iDefenseModifier
|The defence percentage added to all units on the tile of the improvement
|The defence percentage added to all units on the tile of the improvement
|-
!iHappiness
|The Happiness modifier that the improvement provides to the nearest city.
|-
|-
!iPillageGold
!iPillageGold
Line 185: Line 188:
   <iAirBombDefense>5</iAirBombDefense>
   <iAirBombDefense>5</iAirBombDefense>
   <iDefenseModifier>0</iDefenseModifier>
   <iDefenseModifier>0</iDefenseModifier>
  <iHappiness>0</iHappiness>
   <iPillageGold>5</iPillageGold>
   <iPillageGold>5</iPillageGold>
   <TerrainMakesValids>
   <TerrainMakesValids>

Revision as of 18:36, 16 August 2009

The Civ4ImprovementInfos file defines all of the Civilization's improvements as well as their effects, like providing extra food, production or commerce.

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.

This page is missing information. Do not remove this notice until it is complete.


Tags

Text

Tag Name Description
Type The internal name of this Improvement.
Description A reference to the text files, which contain an entry for this resource.
Civilopedia Refers to a tag in the Civ4GameText file which stores the Civilopedia description for the Improvement.
ArtDefineTag Refers to a tag in the Civ4ArtDefines Improvement files
WorldSoundscapeAudioScript Refers to the Audiodefines file for the ambient background music that is played when the tile is on screen.


Integers

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

Tag Name Description
iTilesPerGoody States how many tiles must exist per goody hut generated. (E.g If the value is 40, for every fourty tiles in game, one goody hut is placed.)
iGoodyRange The distance from which this goody hut can be seen by a unit
iUpgradeTime The time in turns that is needed on standard gamespeed until it upgrades to another improvement
iAirBombDefense The defence of this improvement against attacks by air units. (it seems that if the strength of the air unit is equal to the airbombdefense, there is a 50-50 chance that it get´s destroyed on attack.)
iDefenseModifier The defence percentage added to all units on the tile of the improvement
iHappiness The Happiness modifier that the improvement provides to the nearest city.
iPillageGold the base gold value that a unit get´s if this improvement is pillaged
iDiscoverRand The chance that the resource will be discovered on the improvement plot. (A percentage?)


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
bHillsMakesValid If true, the improvement always can be built on a hill, regardless of anything else. (0 = false, 1 = true)
bFreshWaterMakesValid If true, the improvement always can be built next to a river or a lake.
bRiverSideMakesValid If true, the improvement always can be built next to a river.
bRequiresIrrigation if true, the improvement needs an irrigated title next to it before it can be built.
bCarriesIrrigation If true, the improvement will count as irrigated so you can irrigate titles next to it.
bRequiresFeature If true, the improvement needs the specified feature existing or it will be removed.
bWater If true, the improvement needs water to be built on.
bGoody if true, the improvement acts as a goody hut.
bPermanent If true, the improvement cannot be destroyed.
bGraphicalOnly If true, the improvement is simply a graphic added to the map. Used for the land/water worked improvements.
bUseLSystem Unknown, is always 1.

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
PrereqNatureYields The amount of food, production, commerce that already has to be on the title before the improvement can be built there. (note that a river adds one commerce and that a forest adds one production.)
YieldChanges The food, production, commerce changes that occur if this improvement has been built on a title
TerrainMakesValid The specified terrain types on which this improvement can be built
FeatureMakesValid The specified feature types on which this improvement can be built
BonusTypeStructs The bonus resource(s) that allows the improvement to be built upon
ImprovementPillage If the improvement is pillaged, this lists what it is downgraded to. (Ex. A pillaged Cottage downgrades to a Hamlet.)
ImprovementUpgrade The improvement to which this one is upgraded after the iUpgradeTime is passed.
TechYieldChanges Food, production, commerce changes for the improvement after the specified tech has been researched.
RouteYieldChanges Food, production, commerce changes if a road or railroad was built on the improvement tile


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.

 <ImprovementInfo>
  <Type>IMPROVEMENT_FARM</Type>
  <Description>TXT_KEY_IMPROVEMENT_FARM</Description>
  <Civilopedia>TXT_KEY_IMPROVEMENT_FARM_PEDIA</Civilopedia>
  <ArtDefineTag>ART_DEF_IMPROVEMENT_FARM</ArtDefineTag>
   <PrereqNatureYields>
    <iYield>1</iYield>
    <iYield>0</iYield>
    <iYield>0</iYield>
   </PrereqNatureYields>
  <IrrigatedYieldChange>
   <iYield>1</iYield>
   <iYield>0</iYield>
   <iYield>0</iYield>
  </IrrigatedYieldChange>
  <bHillsMakesValid>0</bHillsMakesValid>
  <bFreshWaterMakesValid>1</bFreshWaterMakesValid>
  <bRiverSideMakesValid>0</bRiverSideMakesValid>
  <bNoFreshWater>0</bNoFreshWater>
  <bRequiresFlatlands>1</bRequiresFlatlands>
  <bRequiresRiverSide>0</bRequiresRiverSide>
  <bRequiresIrrigation>1</bRequiresIrrigation>
  <bCarriesIrrigation>1</bCarriesIrrigation>
  <bRequiresFeature>0</bRequiresFeature>
  <bWater>0</bWater>
  <bGoody>0</bGoody>
  <bPermanent>0</bPermanent>
  <bUseLSystem>1</bUseLSystem>
  <iTilesPerGoody>0</iTilesPerGoody>
  <iGoodyRange>0</iGoodyRange>
  <iUpgradeTime>0</iUpgradeTime>
  <iAirBombDefense>5</iAirBombDefense>
  <iDefenseModifier>0</iDefenseModifier>
  <iHappiness>0</iHappiness>
  <iPillageGold>5</iPillageGold>
  <TerrainMakesValids>
   <TerrainMakesValid>
    <TerrainType>TERRAIN_GRASS</TerrainType>
    <bMakesValid>1</bMakesValid>
   </TerrainMakesValid>
   <TerrainMakesValid>
   <TerrainType>TERRAIN_PLAINS</TerrainType>
   <bMakesValid>1</bMakesValid>
   </TerrainMakesValid>
  </TerrainMakesValids>
  <FeatureMakesValids/>
  <BonusTypeStructs>
   <BonusTypeStruct>
     <BonusType>BONUS_CORN</BonusType>
     <bBonusMakesValid>1</bBonusMakesValid>
     <bBonusTrade>1</bBonusTrade>
     <iDiscoverRand>0</iDiscoverRand>
    <YieldChanges>
     <iYieldChange>2</iYieldChange>
     <iYieldChange>0</iYieldChange>
    <iYieldChange>0</iYieldChange>
   </YieldChanges>
   </BonusTypeStruct>
  </BonusTypeStructs>
  <ImprovementPillage/>
  <ImprovementUpgrade/>
  <TechYieldChanges>
   <TechYieldChange>
    <PrereqTech>TECH_BIOLOGY</PrereqTech>
    <TechYields>
     <iYield>1</iYield>
     <iYield>0</iYield>
     <iYield>0</iYield>
    </TechYields>
   </TechYieldChange>
  </TechYieldChanges>
  <RouteYieldChanges/>
  <bGraphicalOnly>0</bGraphicalOnly>
 </ImprovementInfo>


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