CIV4UnitInfos

This page is incomplete and is missing information.
Missing info is usually marked with something like Not Sure or simply left blank.
Do not remove this until this is complete
Contents
[hide]
1 Summary
2 Single Line Tags
2.1 Text Tags
2.2 Boolean Tags
2.3 Integer Tags
3 Multi Line Tags
4 Example

[edit]Summary
This file contains the variables that define a Unit's abilities. It also contains a few variables defining the Unit graphics. More of these can be found in CIV4ArtDefines_Unit.xml

[edit]Single Line Tags
[edit]Text Tags
Class = The class of the Unit (see CIV4UnitClassInfos.xml)
Type = The type of Unit (see CIV4ArtDefines_Unit.xml).
Special = Used in conjunction with SpecialCargo to determine if a Unit can carry this Unit (see also: CIV4SpecialUnitInfos.xml) - May be other uses
Capture = What unit the Unit becomes if Captured (for example, when capturing Settlers, you get Workers).
Combat = The combat type of the Unit. These combat types are defined in Civ4BasicInfos.xml. This is used for working out combat modifiers, and defining which Promotions a Unit can have.
Domain = The type of Terrain the Unit belongs on.
DefaultUnitAI = Controls which setting the [AI] uses most when using the Unit.
Invisible = Makes the unit invisible to all units, except to those with a SeeInvisible entry exactly the same.
SeeInvisible = Makes the unit able to see any unit with the same Invisible entry.
Description = Refers to a tag in CIV4GameTextInfos_Objects.xml that stores the in-game name of the Unit.
Civilopedia = Refers to a tag in CIV4GameText_Civilopedia_Units.xml which stores the Civilopedia description for the Unit.
Strategy = Refers to a tag in CIV4GameText_Strategy.xml that stores the strategic or usage info on the Unit, displayed in mouseover pop-ups.
Advisor = Defines the type of Advisor that would recommend this Unit.
HolyCity = If set, the Unit can only be constructed in the Holy City of the Religion type specified.
ReligionType = If set, the Unit can only be constructed if the specified Religion type is present in a city within the Civilization (Not necessarily in the city where it is being constructed)
PrereqReligion = Defines Religion needed for production.
StateReligion = If set, the Unit can only be constructed while the specified Religion type is the Civilization's State Religion.
PrereqBuilding = Defines a specific Building that is required to construct the Unit.
PrereqTech = Defines a specific Technology that is required to construct the Unit. This Technology will be the one shown on the tech tree.
BonusType = Defines a specific Resource that is required to construct the Unit (see also: PrereqBonuses)
SpecialCargo = Can only carry units with the Special tag equal to this entry
DomainCargo = Defines the Domain of Units that this Unit can carry.
Button = Has two entries separated with comma. The first entry is for the civilopedia button (stand alone DDS file), the second one for the round button (DDS file with all buttons) in the game. Actually there is no need for two art files, if you use only one button Civ4 will use it for both. Don`t forget to remove the commas if you use only one button.


[edit]Boolean Tags
bAnimal = Unit is an Animal. This is used in combat to determine whether opposing units' iAnimalCombat modifier applies. [edit note: A value of 1 also prevents the unit from moving inside cultural borders, including it's own.]
bFood = Uses up food as well as hammers in production.
bNoBadGoodies = No Barbarians from huts
bOnlyDefensive = Unit can only defend
bNoCapture = Unit can not capture Cities
bRivalTerritory = Ability to go into the culture of other Civs without treaty.
bMilitaryHappiness = Military Units increase happyness under some Civics
bMilitarySupport = Costs gold to support the Unit
bMilitaryProduction = Unit counts as a Military Unit for other elements that require this, for example the bMilitaryFoodProduction element of CIV4CivicInfos.xml
bPillage = Can Pillage Improvements
bSabotage = Spy mission (Sabotage Tile Improvements)
bDestroy = Spy mission (Destroy City Production)
bStealPlans = Spy mission (stealing enemy troop positions)
bInvestigate = Spy mission (Sees all City info when stationed in a foreign City)
bCounterSpy = Spy mission (defending city against enemy (Spys)
bFound = Able to make new cities
bGoldenAge = Start a Golden Age
bInvisible = Always invisible (like Spys, not like Submarines)
bFirstStrikeImmune = Unit is immune to First Strike ability
bNoDefensiveBonus = Unit gets no defensive bonus from terrain.
bIgnoreBuildingDefense = Unit ignores building defence modifiers (eg. Walls) when attacking cities
bCanMoveImpassable = Unit can travel over impassable Terrain.
bFlatMovementCost = Unit ignores Terrain costs and Roads/Railroads
bIgnoreTerrainCost = Unit ignores Terrain costs, but uses Roads/Railroads
bNukeImmune = Unit does not receive damage from Nukes
bPrereqBonuses = only workboat is true. Unit can only be produced if there are any bonuses (fish, etc.)on that body of water. unknown if works on land as well.
bPrereqReligion = If switched 'on', this Unit requires that there is a Religion (any) present in the City.
bMechanized = Unit requires Oil to be built. Oil must be in the resource pool of the city where the unit is being built.
bAltDown = If set to '1', the 'Alt' key must be pressed with the Hotkey.
bShiftDown = If set to '1', the 'Shift' key must be pressed with the Hotkey.
bCtrlDown = If set to '1', the 'Ctrl' key must be pressed with the Hotkey.


[edit]Integer Tags
iAIWeight = Makes the AI favour the Unit (if positive), and disfavour it (if negative)
iCost = Cost of Unit in Hammers (scaled by game speed). -1 seems to mean unit can't be built (ie. animals and great people).
iHurryCostModifier = Additional construction costs incurred if the Unit is Hurried with Gold or Population.
iMinAreaSize = Minimal number of water squares near a port, needed to build a sea vessel (in order to prevent "lake navigation"). '20' used for all sea units except Work Boat.
iMoves = Base moves
iAirRange = Range of Air missions (like Bombing, Scouting….), also the range of ships and artillery engaging in a ranged attack. NOTE: For non-air units, this is set to 0 by default. A player must set this value to enable the capability.
iAirUnitCap = How many air units (fighters, bombers and airships - helos are NOT air units in CivIV) this unit can carry.
iNukeRange = Area of Effect for Nukes (-1 means no effect, 0 is just that tile, 1 all 9 tiles….)
iWorkRate = Percentage of the standard work rate for Workers
iBaseDiscover = Base amount of Research Points generated (Great People special missions)
iDiscoverMultiplier = Multiplier of the above
iBaseHurry = Baseamount of Hammers generated (Great People special missions)
iHurryMultiplier = Multiplier of the above
iBaseTrade = Baseamount of Gold generated (Great People special missions)
iTradeMultiplier = Multiplier of the above
iGreatWorkCulture = Base amount of Culture generated by a Great Artist when executing the Great Work mission. NOTE: The final modified Culture value is applied to the city and surrounding tiles over several turns. The amount of Culture applied decreases significantly at each tile farther from the city.
iCombat = Base combat strength value for non-DOMAIN_AIR units. The other modifiers listed in this file are added to/subtracted from this value.
iCombatLimit = Maximum damage, in percentage, of a defender's 'health' that the unit can inflict; ie: a target has 100% 'health' and our unit has an iCombatLimit of 80 (%). Our unit cannot kill the defender as it will have 20% of it's health left after our attack.
iAirCombat = Base combat strength value for DOMAIN_AIR units. The other modifiers listed in this file are added to/subtracted from this value.
iAirCombatLimit = Percentage that Aerial Units are able to damage (100 means Planes can fully destroy other Units)
iXPValueAttack = The base Experience that the Unit gets when attacking successfully. This base experience is modified by the equation: Experience = ((BaseExperience * DefenderStrength) / AttackerStrength) where DefenderStrength and AttackerStrength are the combat strengths of the units before the combat took place.
iXPValueDefense = The base Experience that the Unit gets when defending successfully. This base experience is modified by the equation: Experience = ((BaseExperience * AttackerStrength) / DefenderStrength) where DefenderStrength and AttackerStrength are the combat strengths of the units before the combat took place.
iFirstStrikes = Number of First Strikes Ability the Unit has
iChanceFirstStrikes = Additional First Strike chances
iInterceptionProbability = % Chance of Intercepting enemy Air Missions
iEvasionProbability = % Chance of evading Intercepting Fighters (Aeroplanes)
iWithdrawalProb = Chance of retreating from (losing) fight
iCollateralDamage = Percent change in the unit's Combat Strength when determining Collateral Damage. (Ex: 200 means the unit has double strength, 100 means the unit has typical strength, 0 means the unit does no collateral damage).
iCollateralDamageLimit = Percentage Collateral Damage Unit is allowed to do (100 means you can destroy units using Collateral Damage)
iCollateralDamageMaxUnits = Number of Units in stack that the Unit is able to hit with Collateral Damage
iCityAttack = Bonus for attacking a city
iCityDefense = Bonus for defending in a city
iAnimalCombat = Bonus against Animals
iHillsAttack = Bonus for attacking a Hill
iHillsDefense = Bonus for defending on a Hill
iBombRate = Damage an Airplane can dish out when on a Bombing Run
iBombardRate = Damage a ground/sea unit can dish out against Cities
iCargo = Space in the Unit for carrying other Units
iConscription = If the value is above 0, this Unit is eligible for drafting. The number sets the priority by which the units will be drafted, if a city can train more than one draftable Unit type. The Unit type with the highest value is always drafted.
iCultureGarrison = The suppresion value of a unit while garrisoned in a rebelling city
iExtraCost = Additional Gold you have to pay for every Unit built
iAsset = How much the Unit contributes toward your score. There may be some scaling factor
iPower = Used by the AI to determine relative powers of players
iHotKeyPriority = If several objects have the same Hotkey defined, this value is compared to determine their internal priority.
[edit]Multi Line Tags
UniqueNames = A list of names that the Unit can take
UnitClassUpgrade = Defines which Units Classes the Unit can Upgrade to.
UnitAIs = Defines which AIs the Unit is more likely to use.
NotUnitAIs = Defines which AIs the Unit will not use.
Builds = A list of worker projects the Unit can undertake.
ReligionSpreads = Defines which Religions the Unit can spread.
GreatPeoples = Types of Specialists this Unit can settle in a City as (Great Person Mission)
Buildings = The Buildings that the Unit can Rush Build in friendly Cities.
ForceBuildings = The Buildings that the Unit can Rush Build in any city (including Foreign cities)
TechType = Used for pre-requisite Technologies beyond the first pre-requisite.
PrereqBonuses = These are "OR" prerequisite resources. A Unit with Oil and Uranium listed here, for example, will require one or the other. (See Destroyer/Carrier in base game for examples)
ProductionTraits = Gives a bonuses to production depening on the Traits of your Leader.
Flavors = Determines what Technology a Great Person will research.
TerrainImpassables = Terrain types that the Unit can normally enter (based on DOMAIN type), but will be prohibited from entering *unless* the tile is within cultural boundaries. See default XML for the GALLEY unit for a usage example.
FeatureImpassables = A Feature that the unit can OR cannot move onto. If a terrain is specified as impassable, using a 0 value on the bFeatureImpassable variable will allow movement.
TerrainNatives = Unit only spawn in chosen terrains.
FeatureNatives = Unit only spawn in terrains with the chosen feature (ex. Forest, Jungle). Can be used combined with 'TerrainNatives
TerrainDefenses = Modifier for defending in the specified types of Terrain
FeatureDefenses = Modifier for defending in tiles with the specified types of Features
UnitClassAttackMods = Gives an attack bonus against certain Unit Classes
UnitClassDefenseMods = Gives a defence bones against certain Unit Classes
UnitCombatMods = Adds bonus when fighting against specific Unit Combat Types
DomainMods = Gives a percentage bonus in combat against a specified Domain
BonusProductionModifiers = Percentage modifier to the Production Output of the City, while it is constructing this Unit, if it has access to one of the Bonuses specified.
UnitMeshGroups = Defines some of the graphics used for the Unit. See also CIV4ArtDefines_Unit.xml.
HotKey = The hotkey for the Unit.
FreePromotions = Gives the Unit a specified Promotion on completion
LeaderPromotion = Gives the Unit a specified Promotion when a Great General is used.
iLeaderExperience = Gives the Unit stack a specified amount of experience when a Great General is used.
[edit]Example
An entry for the Warrior:

<UnitInfo>
<Class>UNITCLASS_WARRIOR</Class>
<Type>UNIT_WARRIOR</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MELEE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_WARRIOR</Description>
<Civilopedia>TXT_KEY_UNIT_WARRIOR_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_WARRIOR_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<bAnimal>0</bAnimal>
<bFood>0</bFood>
<bNoBadGoodies>0</bNoBadGoodies>
<bOnlyDefensive>0</bOnlyDefensive>
<bNoCapture>0</bNoCapture>
<bRivalTerritory>0</bRivalTerritory>
<bMilitaryHappiness>1</bMilitaryHappiness>
<bMilitarySupport>1</bMilitarySupport>
<bMilitaryProduction>1</bMilitaryProduction>
<bPillage>1</bPillage>
<bSabotage>0</bSabotage>
<bDestroy>0</bDestroy>
<bStealPlans>0</bStealPlans>
<bInvestigate>0</bInvestigate>
<bCounterSpy>0</bCounterSpy>
<bFound>0</bFound>
<bGoldenAge>0</bGoldenAge>
<bInvisible>0</bInvisible>
<bFirstStrikeImmune>0</bFirstStrikeImmune>
<bNoDefensiveBonus>0</bNoDefensiveBonus>
<bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>
<bCanMoveImpassable>0</bCanMoveImpassable>
<bFlatMovementCost>0</bFlatMovementCost>
<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
<bNukeImmune>0</bNukeImmune>
<bPrereqBonuses>0</bPrereqBonuses>
<bPrereqReligion>0</bPrereqReligion>
<bMechanized>0</bMechanized>
<UnitClassUpgrades>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_AXEMAN</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_SPEARMAN</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<NotUnitAIs>
<UnitAI>
<UnitAIType>UNITAI_CITY_DEFENSE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</NotUnitAIs>
<Builds/>
<ReligionSpreads/>
<GreatPeoples/>
<Buildings/>
<ForceBuildings/>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqBuilding>NONE</PrereqBuilding>
<PrereqTech>NONE</PrereqTech>
<TechTypes/>
<BonusType>NONE</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors/>
<iAIWeight>0</iAIWeight>
<iCost>15</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iMinAreaSize>-1</iMinAreaSize>
<iMoves>1</iMoves>
<iAirRange>0</iAirRange>
<iNukeRange>-1</iNukeRange>
<iWorkRate>0</iWorkRate>
<iBaseDiscover>0</iBaseDiscover>
<iDiscoverMultiplier>0</iDiscoverMultiplier>
<iBaseHurry>0</iBaseHurry>
<iHurryMultiplier>0</iHurryMultiplier>
<iBaseTrade>0</iBaseTrade>
<iTradeMultiplier>0</iTradeMultiplier>
<iGreatWorkCulture>0</iGreatWorkCulture>
<TerrainImpassables/>
<FeatureImpassables/>
<iCombat>2</iCombat>
<iAirCombat>0</iAirCombat>
<iAirCombatLimit>0</iAirCombatLimit>
<iXPValueAttack>4</iXPValueAttack>
<iXPValueDefense>2</iXPValueDefense>
<iFirstStrikes>0</iFirstStrikes>
<iChanceFirstStrikes>0</iChanceFirstStrikes>
<iInterceptionProbability>0</iInterceptionProbability>
<iEvasionProbability>0</iEvasionProbability>
<iWithdrawalProb>0</iWithdrawalProb>
<iCollateralDamage>0</iCollateralDamage>
<iCollateralDamageLimit>0</iCollateralDamageLimit>
<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
<iCityAttack>0</iCityAttack>
<iCityDefense>25</iCityDefense>
<iAnimalCombat>0</iAnimalCombat>
<iHillsAttack>0</iHillsDefense>
<iHillsDefense>0</iHillsDefense>
<TerrainNatives/>
<FeatureNatives/>
<TerrainDefenses/>
<FeatureDefenses/>
<UnitClassAttackMods/>
<UnitClassDefenseMods/>
<UnitCombatMods/>
<DomainMods/>
<BonusProductionModifiers/>
<iBombRate>0</iBombRate>
<iBombardRate>0</iBombardRate>
<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo>0</iCargo>
<iConscription>1</iConscription>
<iCultureGarrison>3</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>1</iAsset>
<iPower>1</iPower>
<UnitMeshGroups>
<iGroupSize>3</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>8</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_WARRIOR</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<Button>,Art/Interface/Buttons/Units/Warrior.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,2,1</Button>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions/>
</UnitInfo>

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License