Civ4BonusInfos: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
Line 77: Line 77:
|-
|-
!iPlayer
!iPlayer
|Unknown
|Approximate occurances per player, in percent (%), so 150 is about 1.5 per player.
|-
|-
!iTilesPer
!iTilesPer
|Unknown - (Perhaps the minimum tiles that the resource must occupy)
|The fixed number of additional occurances per x tiles, so 120 would mean an additional occurance every 120 tiles existing on the map. Note, an additional random number of this resource is added by iRandApp1 through iRandApp4.
|-
|-
!iMinLandPercent
!iMinLandPercent
|Unknown
|If a resource can be on land and ocean, this is percantage that will be located on land.
|-
|-
!iUnique
!iUnique
|Unknown
|This is the range in tiles that this resource will be unique, all tiles within this radius are invalid for another resource. Note, there is also a unique field for each BonusClass (General:0, Grain:5, Livestock:5, Rush:4, Modern:4, Wonder:8), changing this value without changing the value in CIV4BonusClassInfos may not have the intended effect. In addition, no bonus resource can ever be directly adjacent to a differnt bonus resouce, unless overidden by the specific map script.|-
|-
!iGroupRange
!iGroupRange
|Unknown
|If non-zero, every time this resource is placed, all tiles within iGroupRange radius have a iGroupRand chance to also have this resource.|-
|-
!iGroupRand
!iGroupRand
|Unknown
|If iGroupRange is non-zero, this is the percentage chance that each tile within iGroupRange radius will contain that resource.|}
|}


===Boolean===
===Boolean===

Revision as of 19:22, 15 November 2009

The Civ4BonusInfos file defines all of the game's resources as well as their effects, like providing extra health and happiness.

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 Resource.
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 bonus.
BonusClassType Used to specify the category of the bonus. Must be a name coming from the file "Civ4BonusClassInfos" where a frequency for each bonus class can be stated.
ArtDefineTag Refers to a tag in the Civ4ArtDefines Bonus files
TechReveal States which technology enables the resource.
TechCityTrade The technology that enables the trading of this resource.
TechObsolete The technology that obsoletes the resource

Integers

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

Tag Name Description
iAITradeModifier The number defines how much the AI values the resource, the higher the number, the more the value.
iAIObjective Unknown, the value is 0 for all resources
iHealth change in healthiness the resource provides
iHappiness change in happyness the resource provides
iPlacementOrder How many of the resource are placed on the map, (-1 places none, higher numbers place more)
iConstAppearance The chance that the resource will be placed on the map
iMinAreaSize Minimum needed size of island or continent to make appear the resource
iMinLatitude Minimum distance from equator.
iMaxLatitude Maximum distance from equator.
iPlayer Approximate occurances per player, in percent (%), so 150 is about 1.5 per player.
iTilesPer The fixed number of additional occurances per x tiles, so 120 would mean an additional occurance every 120 tiles existing on the map. Note, an additional random number of this resource is added by iRandApp1 through iRandApp4.
iMinLandPercent If a resource can be on land and ocean, this is percantage that will be located on land.
iUnique - iGroupRange - iGroupRand }

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
bArea Unknown
bHills If the resource may appear only on hills.
bFlatlands If the resource may appear only on flat land.
bNoRiverSide If the resource can not appear next to a river
bNormalize Unknown


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
Rands Unknown
YieldChanges Defines the change in city yield, using iYield. There are three iYield tags: the first is for food per turn change, the second for hammers per turn, and the third for commerce per turn (e.g. the Palace provides 8 free commerce per turn).
TerrainBooleans Defines which terrain types the resource may appear on.


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.

<BonusInfos>
<BonusInfo>
  <Type>BONUS_HORSE</Type>
  <Description>TXT_KEY_BONUS_HORSE</Description>
  <Civilopedia>TXT_KEY_BONUS_HORSE_PEDIA</Civilopedia>
  <BonusClassType>BONUSCLASS_RUSH</BonusClassType>
  <ArtDefineTag>ART_DEF_BONUS_HORSE</ArtDefineTag>
  <TechReveal>TECH_ANIMAL_HUSBANDRY</TechReveal>
  <TechCityTrade>TECH_ANIMAL_HUSBANDRY</TechCityTrade>
  <TechObsolete>NONE</TechObsolete>
  <YieldChanges>
   <iYieldChange>0</iYieldChange>
   <iYieldChange>1</iYieldChange>
   <iYieldChange>0</iYieldChange>
  </YieldChanges>
  <iAITradeModifier>0</iAITradeModifier>
  <iAIObjective>0</iAIObjective>
  <iHealth>0</iHealth>
  <iHappiness>0</iHappiness>
  <iPlacementOrder>1</iPlacementOrder>
  <iConstAppearance>100</iConstAppearance>
  <iMinAreaSize>3</iMinAreaSize>
  <iMinLatitude>0</iMinLatitude>
  <iMaxLatitude>80</iMaxLatitude>
  <Rands>
   <iRandApp1>10</iRandApp1>
   <iRandApp2>10</iRandApp2>
   <iRandApp3>0</iRandApp3>
   <iRandApp4>0</iRandApp4>
  </Rands>
  <iPlayer>100</iPlayer>
  <iTilesPer>256</iTilesPer>
  <iMinLandPercent>0</iMinLandPercent>
  <iUnique>6</iUnique>
  <iGroupRange>0</iGroupRange>
  <iGroupRand>0</iGroupRand>
  <bArea>0</bArea>
  <bHills>0</bHills>
  <bFlatlands>1</bFlatlands>
  <bNoRiverSide>1</bNoRiverSide>
  <bNormalize>0</bNormalize>
  <TerrainBooleans>
   <TerrainBoolean>
    <TerrainType>TERRAIN_GRASS</TerrainType>
     <bTerrain>1</bTerrain>
    </TerrainBoolean>
    <TerrainBoolean>
     <TerrainType>TERRAIN_PLAINS</TerrainType>
     <bTerrain>1</bTerrain>
   </TerrainBoolean>
   <TerrainBoolean>
    <TerrainType>TERRAIN_TUNDRA</TerrainType>
    <bTerrain>1</bTerrain>
   </TerrainBoolean>
   </TerrainBooleans>
  <FeatureBooleans/>
  <FeatureTerrainBooleans/>
</BonusInfo>
</BonusInfos>


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