Civ4UnitInfos: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
m (Unprotected "Civ4UnitInfos")
 
(57 intermediate revisions by 25 users not shown)
Line 1: Line 1:
The '''Civ4UnitInfos''' XML file controls data related to individual units: for example, a unit's strength value or hammer cost.  There are also more detailed options, affecting things like transport capability, prerequisites, and other complex features.
The '''Civ4UnitInfos''' XML file controls data related to individual units: for example, a unit's strength value or production cost.  There are also more detailed options, affecting things like transport capabilities, prerequisites, and other complex features.


All tags must be opened and closed; the first is the 'open', the second the 'closed' 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 'closed' 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.


== Header Tags ==
<font color=red>This page is missing information.
Do not remove this notice until it is complete.</font>


{| class="wikitable" border="1" style="text-align:left" cellpadding="5"
 
==Tags==
=== Headers ===
 
These tags typically bracket other tags, sometimes the entire file, and are generally used to specify more than one piece of data.
 
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
! Capture
| Either NONE, or the unit which the unit turns into when captured.
|-
! Class
| The class as defined in CIV4UnitClassInfos.xml. Class is the thing that holds, say, a Swordsman and a Praetorian together; each civilization can only have one of each class.
|-
! Combat
| The combat type, out of UNITCOMBAT_MELEE, UNITCOMBAT_ARCHER, UNITCOMBAT_MOUNTED, UNITCOMBAT_GUN, UNITCOMBAT_SIEGE, UNITCOMBAT_NAVAL, UNITCOMBAT_AIR and UNITCOMBAT_HELICOPTER of the unit - used to determine bonuses in combat & defense.
|-
! Domain
| DOMAIN_ - then AIR, SEA or LAND.
|-
! DefaultUnitAI
| The default way in which the AI uses the unit.
|-
! Invisible
| Either NONE (either meaning not invisible or completely invisible, see below) or INVISIBLE_STEALTH or INVISIBLE_SUBMARINE.
|-
! SeeInvisible
| Either NONE or a category of invisibility above. Means that the unit can see all units with this type of invisibility.
|-
! Special
| Should be NONE unless it comes under a heading in CIV4SpecialUnitInfos.xml; in which case write that.
|-
|-
! Tag !! Usage
! Type
| The name of the unit; which must be unique.
|-
! UnitInfo
| Each different unit's data is enclosed in a seperate tag like this.
|-
|-
! UnitInfos
! UnitInfos
| This begins and ends the file. Everything must go in between these two, or it will not work.
| This begins and ends the file. Everything must go in between these two, or it will not work.
|-
|-
! UnitInfo
! UniqueNames
| Each different unit's data is enclosed in a seperate tag like this.
| Can be used to make the same unit have seperate names. kinda the same as cities. Can either contain text or a text tag
|}
 
 
=== Prerequisites ===
 
These tags ''must'' be included when writing new entries, or the game will crash or otherwise malfunction.
 
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
! AdvancedStartCost
| The cost in points of the unit on Advanced Start.
|-
! AdvancedStartCostIncrease
| Affects the cost in points of the unit on Advanced Start.
|-
! BonusType
| The resource needed to build this unit.
|-
! Flavors
| The 'flavours' of the unit - these relate to leader behavior in the AI.
|-
! HolyCity
| If not NONE, then it is the Holy City needed to build the unit.
|-
! HurryCostModifier
| Impacts the Gold Hurry cost of the unit.
|-
|-
! Class
! MinAreaSize
| The class as defined in CIV4UnitClassInfos.xml. Class is the thing that holds, say, a Swordsman and a Praetorian together; each civilisation can only have one of each class.
| Minimal number of water squares needed nearby to build sea vessels (20 for all sea units except Work Boats).
|-
|-
! Type
! Moves
| The name of the unit; which must be unique
| The number of movement points that the unit has.
|-
|-
! UniqueNames
! PrereqBonuses
| Only ever a closing tag. Just put it in, OK?
| Used as a list tag to enclose BonusType tags.
|-
|-
! Special
! PrereqBuilding
| Should be NONE unless it comes under a heading in CIV4SpecialUnitInfos.xml; in which case write that.
| Either NONE, or the building needed in a city to build this unit.
|-
|-
! Capture
! PrereqCorporation
| Either NONE, or the unit which the unit turns into when captured
| Either NONE, or the corporation needed in a city to build this unit.
|-
|-
! Combat
! PrereqReligion
| The combat, out of UNITCOMBAT_MELEE, UNITCOMBAT_ARCHER, UNITCOMBAT_MOUNTED, UNITCOMBAT_GUN, UNITCOMBAT_SIEGE, UNITCOMBAT_NAVAL, UNITCOMBAT_AIR and UNITCOMBAT_HELICOPTER of the unit - used to determine bonuses in combat.
| Either NONE, or the religion needed in a city to build this unit.
|-
|-
! Domain
! PrereqTech
| DOMAIN_ - then AIR, SEA or LAND
| Either NONE, or the technology that you need to build this unit.
|-
|-
! DefaultUnitAI
! ProductionTraits
| The default way in which the AI uses the unit.
| The leader traits which affect production of this unit, along with the value.
|-
|-
! Invisible
! ReligionType
| Either NONE (either meaning not invisible or completely invisible, see below) or INVISIBLE_STEALTH or INVISIBLE_SUBMARINE
| For units, always NONE.
|-
|-
! SeeInvisible
! StateReligion
| Either NONE or a category of invisibility above. Means that the unit can see all units with this type of invisibility
| If not NONE, the State Religion needed to build this unit.
|-
|-
! TechTypes
| Used as a list tag to enclose PrereqTech tags.
|}
|}


== Text Tags ==


=== Text ===


{| class="wikitable" border="1" style="text-align:left" cellpadding="5"
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
! Advisor
| Almost always ADVISOR_MILITARY; the rationale that the game gives for reccomending the unit.
|-
! Civilopedia
| As above for the Civiliopedia entry.
|-
! Description
! Description
| Either text or a key from the text files. The name displayed for the unit.  
| Either text or a key from the text files. The name displayed for the unit.  
|-
|-
! Civilopedia
! Help
| As above for the Civiliopedia entry
| Optional. A text that can include some more information to display. The text is specified in any of the Assets\XML\Text files.
|-
|-
! Strategy
! Strategy
| As above for the Sid's Tips, also displayed above the Civilopedia entry
| As above for the Sid's Tips, also displayed above the Civilopedia entry.
|-
! Advisor
| Almost always ADVISOR_MILITARY; the rationale that the game gives for reccomending the unit.
|}
|}


== Boolean Tags ==


{| class="wikitable" border="1" style="text-align:left" cellpadding="5"
=== Integers ===
 
All of these tags have a numerical value.  Though it sometimes can be negative, it usually is not.
 
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
! iAirCombat
| The unit's base strength for Air Units.
|-
! iAirCombatLimit
| Max amount of damage (in percent) able to be inflicted on enemy units when air striking.
|-
! iAirRange
| The range at which an air unit it can operate or the range at which a ground unit can attack.
|-
! iAirUnitCap
| The number of air unit capacity slots the unit takes up -- should be 1 for most, if not all, air units.
|-
! iAIWeight
| The preference given by the AI to this unit, generally for Unique Units.
|-
! iAnimalCombat
| The percent bonus that the unit gets against Animals, in attack and defense.
|-
! iAsset
| Affects the AI's behaviour towards it in some way.
|-
! iBaseDiscover
| The basic rate at which the unit researches technologies.
|-
! iBaseHurry
| Amount of production in a city the unit can hurry.
|-
! iBaseTrade
| The basic amount of money that the unit makes from a Trade Mission.
|-
! iBombardRate
| The rate at which a unit Bombards a city.
|-
! iBombRate
| The damage that a unit does when carrying out an Air Bomb mission.
|-
! iCargo
| The number of units that the unit can carry.
|-
! iChanceFirstStrikes
| The number of First Strike Chances that the unit has.
|-
! iCityAttack
| The percent bonus that the unit gets when attacking cities.
|-
! iCityDefense
| The percent bonus that the unit gets when defending cities.
|-
! iCollateralDamage
| The amount of collateral damage (in percent) that the unit deals.
|-
! iCollateralDamageLimit
| The maximum amount of collateral damage that the unit can deal.
|-
! iCollateralDamageMaxUnits
| The greatest number of enemy units that the unit can inflict collateral damage on.
|-
! iConscription
| The number of this unit that can be drafted.
|-
! iCombat
| The unit's base strength.
|-
! iCombatLimit
| Percentage that tells how much damage a unit can give out before retreating.
|-
! iCost
| The cost in hammers of the unit.
|-
! iCultureGarrison
| The suppression value of a unit while garrisoned in a rebelling city.
|-
! iDiscoverMultiplier
| Affects the rate at which the unit researches technologies.
|-
! iDropRange
| The range at which the unit can 'jump'/paradrop from a friendly city.
|-
! iEspionagePoints
| Used for Spy Units (ex. Great Spy) - the number of espionage points the unit can generate when infiltrating an enemy city.
|-
! iEvasionProbability
| For air and parachute units; the odds of evading interception.
|-
! iExtraCost
| Affects the upkeep (in gold per turn) of the unit; ex. a value of 1 equals +1 gold per turn cost.
|-
! iFirstStrikes
| The number of automatic First Strikes that the unit has.
|-
! iGreatWorkCulture
| The amount of culture that the unit generates with a Great Work.
|-
! iHillsAttack
| The percent bonus that the unit gets when attacking hills.
|-
! iHillsDefense
| The percent bonus that the unit gets when defending hills.
|-
! iHotKeyPriority
| <font color=red>Not sure what this does.</font>
|-
! iHurryMultiplier
| Multiplier of the above.
|-
! iInterceptionProbability
| The percent odds a unit has of intercepting an enemy unit within range trying to carry out an air mission.
|-
! iLeaderExperience
| The amount of experience this unit gives to units in the same stack when leading as a warlord; used for Great Generals.
|-
! iNukeRange
| The range at which the 'nuke' can be launched - missiles only.
|-
! iOrderPriority
| Optional. <font color=red>Not sure what this does.</font>
|-
|-
! Tag !! Usage
! iPower
| Affects the amount that the AI factors it into the equation when determining your military power.
|-
|-
! bAnimal
! iTradeMultiplier
|  
| Affects the amount of money that the unit makes from a Trade Mission.
|-
|-
! bFood
! iWithdrawalProb
|  
| The percent withdrawal chance the unit has. Maximum Value is in GlobalDefines.xml
|-
|-
! bNoBadGoodies
! iWorkRate
|  
| The rate at which the unit improves tiles.
|-
|-
! bOnlyDefensive
! iXPValueAttack
|  
| The value, in Experience Points, that this unit is worth on the attack.
|-
|-
! bNoCapture
! iXPValueDefense
|  
| The value, in Experience Points, that this unit is worth on the defense.
|}
 
=== 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".
 
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! bQuickCombat
! style="background:#efefef;" | Tag Name
|  
! style="background:#efefef;" | Description
|-
|-
! bRivalTerritory
! bAltDown
|  
| If 1, the hotkey for this unit must be used with Alt.
|-
|-
! bMilitaryHappiness
! bAlwaysHostile
|  
| Can attack enemy units without declaring war, and can be attacked without triggering a war. All nations treat it as an enemy unit.
|-
|-
! bMilitarySupport
! bAnimal
|  
| The unit is an animal; the Barbarian State controls it, it can spring from anywhere and it cannot enter cultural borders.
|-
|-
! bMilitaryProduction
! bCanMoveImpassible
|  
| If set to 1, the unit can move through impassable terrain; ex. submarines moving through ice, helicopters moving through peaks.
|-
|-
! bPillage
! bCanMoveAllTerrain
|  
| Can move across all terrain.
|-
|-
! bSpy
! bCounterSpy
|  
| Should only be 1 in Vanilla or Warlords; can Perform Counterespionage.
|-
|-
! bSabotage
! bCtrlDown
|  
| If 1, the hotkey for this unit must be used with Ctrl.
|-
|-
! bDestroy
! bDestroy
|  
| Should only be 1 in Vanilla or Warlords; can Destroy Improvements.
|-
|-
! bStealPlans
! bFirstStrikeImmune
|  
| Is immune to First Strikes.
|-
|-
! bInvestigate
! bFlatMovementCost
|  
| Pays a flat movement cost to enter all terrain.
|-
|-
! bCounterSpy
! bFood
|  
| The unit is produced with food as well as hammers; a city does not generate food while building this unit.
|-
|-
! bFound
! bFound
|  
| Can found a city.
|-
|-
! bGoldenAge
! bGoldenAge
|  
| Counts as a Great Person to start a Golden Age.
|-
! bHiddenNationality
| Bears no marking of nationality.
|-
! bIgnoreBuildingDefense
| Ignores defensive bonuses from enemy buildings, like Walls and Castles.
|-
! bIgnoreTerrainCost
| Ignores movement penalties from terrain.
|-
! bInvestigate
| Should only be 1 in Vanilla or Warlords; can Investigate City.
|-
|-
! bInvisible
! bInvisible
|  
| Is invisible to all units.
|-
! bLineOfSight
| Optional. Specifies if the unit can only reveal the content in the tiles in the direction he is facing.
|-
! bMechanized
| Likely affects the sounds played when selecting the unit or issuing it orders (i.e. mechanical noises as opposed to human voices).
Used for land units in a vehicle, air units, sea units, etc.
|-
! bMilitaryHappiness
| Counts as a Military Unit in the eyes of the rabble; contributes to the "+happy for each military unit in a city" civic modifier.
|-
! bMilitaryProduction
| Counts as a military unit for production bonuses/penalties.
|-
! bMilitarySupport
| Costs money to maintain as part of your military, affected by Pacifism and the like.
|-
! bNoBadGoodies
| When this unit is entering a Tribal Village, the villagers will never be hostile.
|-
|-
! bFirstStrikeImmune
! bNoCapture
|  
| This unit cannot capture cities.
|-
|-
! bNoDefensiveBonus
! bNoDefensiveBonus
|  
| Does not receive defensive bonuses.
|-
! bNoRevealMap
| If 1, the unit does not reveal any tiles except the one it is currently standing on.
|-
! bNukeInnume
| Takes no damage from nukes.
|-
|-
! bIgnoreBuildingDefense
! bOnlyDefensive
|  
| This unit cannot attack other units.
|-
|-
! bCanMoveImpassible
! bPillage
|  
| Can pillage improvements.
|-
|-
! bCanMoveAllTerrain
! bQuickCombat
|  
| Always 0 in vanilla BtS; if set to 1, presumably the unit never triggers the camera-angle change and other battle effects when combating another unit.
|-
|-
! bFlatMovementCost
! bRenderAlways
|  
| Optional. Unknown usage.
|-
|-
! bIgnoreTerrainCost
! bRenderBelowWater
|  
| Optional. Unknown usage.
|-
|-
! bNukeInnume
! bRivalTerritory
|  
| Can explore rival territory.
|-
|-
! bPrereqBonuses
! bPrereqBonuses
|  
| Needs the mentioned resources to be built (can be NONE).
|-
|-
! bPrereqReligion
! bPrereqReligion
|  
| Needs the mentioned religion to be built (can be NONE).
|-
! bSabotage
| Should only be 1 in Vanilla or Warlords; can Sabotage Production.
|-
|-
! bMechanized
! bShiftDown
|  
| If 1, the hotkey for this unit must be used with Shift.
|-
|-
! bSuicide
! bSpy
|  
| Is a spy.
|-
|-
! bHiddenNationality
! bStealPlans
|  
| Should only be 1 in Vanilla or Warlords; can Steal Plans.
|-
|-
! bAlwaysHostile
! bSuicide
|  
| Kills itself upon attacking, like a Kamikaze in the Defense mod.
|}
|}


== List Tags ==


== Prerequisite Tags ==
===Lists (Multi-line)===


== Integer Tags ==
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).


== Miscellaneous Tags ==
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
! Builds
| For all the things that the unit can build on tiles; but not wonders that it can build in cities.
|-
! Buildings
| The buildings which the unit can construct in a friendly city.
|-
! CorporationSpreads
| The Corporations which the unit can spread.
|-
! FlankingStrikes
| All unit classes against which the unit gets a Flank Attack.
|-
! ForceBuildings
| The buildings the unit can construct in '''''any''''' city regardless of tech, building prerequisites, or other restrictions (ex: could construct a world wonder in multiple cities).
|-
! GreatPeoples
| If the unit can settle in a city, put the type of specialist it becomes here.
|-
! NotUnitAIs
| As UnitAIs, but for the tasks which the AI will never consider the unit for.
|-
! ReligionSpreads
| The religions which the unit can spread.
|-
! UnitClassDefenders
| Unit defends first against the specified unitclass(es).
|-
! UnitClassTargets
| Unit attacks first against the specified unitclass(es).
|-
! UnitClassUpgrades
| The UnitClass(es) to which this unit upgrades.
|-
! UnitCombatDefenders
| Unit defends first against the specified unitcombat type(s)
|-
! UnitCombatTargets
| Unit attacks first against the specified unitcombat type(s)
|-
! UnitAIs
| Inside here go the methods which the AI uses to command this unit. It dictates the roles which the unit is good for.
|-
|}


== Art Tags ==
=== Miscellaneous ===


{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
! BonusProductionModifiers
| Resources that make the unit produce faster.
|-
! DomainCargo
| The Domain (AIR, SEA, or LAND) of units that the unit can carry.
|-
! DomainMods
| The bonuses/penalties that the unit gets against Air, Sea or Land units.
|-
! FeatureAttacks
| Attack bonus(es) that the unit gets when attacking into different features.
|-
! FeatureDefenses
| Defense bonus(es) that the unit gets from within different features.
|-
! FeatureImpassables
| Used to specify terrain features (Jungle, Forest, etc.) that the unit is unable to enter.
|-
! FeatureNatives
| This affects the feature types animals spawn in.
|-
! FreePromotions
| The promotions that this unit starts with.
|-
! HotKey
| Never used in the original game - it can be used to define a hotkey for the unit.
|-
! LeaderPromotion
| Promotion that the unit gives to another unit when attached as a warlord; used in vanilla BtS for Great Generals.
|-
! SpecialCargo
| The type of SpecialUnit that the unit can carry.
|-
! TerrainAttacks
| Attack bonuses that the unit gets in different terrain.
|-
! TerrainDefenses
| Defense bonuses that the unit gets in different terrain.
|-
! TerrainImpassables
| Used to specify terrain types (Ocean, Desert, etc.) that the unit is unable to enter.
|-
! TerrainNatives
| This affects the terrain types animals spawn in.
|-
! TerrainPassableTechs
| With these technologies, the unit can enter the terrain defined in TerrainImpassables.
|-
! UnitClassAttackMods
| The percent bonuses/penalties that the unit gets against specific UnitClasses in attack.
|-
! UnitClassDefenseMods
| The percent bonuses/penalties that the unit gets against specific UnitClasses in defense.
|-
! UnitCombatCollateralImmunes
| The UnitCombat(s) that this unit does not receive collateral damage from.
|-
! UnitCombatMods
| The percent bonuses/penalties that the unit gets against different UnitCombat groups.
|}


----


'''<UnitInfos></UnitInfos>''' This begins and ends the file. Everything must go in between these two, or it will not work.<br /><br />
=== Art ===
'''<UnitInfo></UnitInfo>''' Each different unit's data is enclosed in a seperate tag like this.<br /><br />
'''<Class></Class>''' The class as defined in CIV4UnitClassInfos.xml. Class is the thing that holds, say, a Swordsman and a Praetorian together; each civilisation can only have one of each class.<br /><br />
These tags are directly related to the rendering of art for the entry.
'''<Type></Type>''' The unit's in-game name, which must be unique.<br /><br />
'''<UniqueNames/>''' Only ever a closing tag, this must be put in after the <Type></Type> tag to show that the unit's 'name' is now finished.<br /><br />
'''<Special></Special>''' Should be NONE unless the unit is in one of your special categories in CIV4SpecialUnitInfos.xml; in which case put that in. <br /><br />
'''<Capture></Capture>''' Should be NONE unless the unit can be captured, in which case it is the class of the unit which appears when it is captured<br /><br />
'''<Combat></Combat>''' Shows the unit's combat, out of UNITCOMBAT_MELEE, UNITCOMBAT_ARCHER, UNITCOMBAT_MOUNTED, UNITCOMBAT_GUN, UNITCOMBAT_SIEGE, UNITCOMBAT_NAVAL, UNITCOMBAT_AIR and UNITCOMBAT_HELICOPTER<br /><br />
'''<Domain></Domain>''' DOMAIN_, then AIR, SEA or LAND. Shows whether the unit is an air, sea or land unit.<br /><br />
'''<DefaultUnitAI></DefaultUnitAI>''' How the AI uses the unit, by default.<br /><br />
'''<Invisible></Invisible>''' Either NONE, INVISIBLE_SUBMARINE or INVISIBLE_STEALTH. If it is not NONE, then the value is what sort of invisibility it has (see below) <br /><br />
'''<SeeInvisible></SeeInvisible>''' NONE, or else the sort of invisible unit (see above) that it can see.<br /><br />
'''<Description></Description>''' The name of the unit as displayed on screen. Can either be text or a tag from another file. If it is not out of a text database, the computer will read what is in here.<br /><br />
'''<Civilopedia></Civilopedia>''' As above; the entry in the Civilopedia for the unit.<br /><br />
'''<Strategy></Strategy>''' The Sid's Tips, as above. Also displayed at the top of the Civilopedia entry<br /><br />
'''<Advisor></Advisor>''' The advisor that will chip in (normally ADVISOR_MILITARY) when building this unit is a good idea.<br /><br />


Boolean Tags
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
 
|-
<bAnimal></bAnimal> Is the unit an animal, out of 1 (yes) or 0 (no). If it is, the Barbarians only can build it and it will not enter cultural borders.<br /><br />
! style="background:#efefef;" | Tag Name
<bFood></bFood> If 1, the city cannot grow while producing this unit, in the same manner as Settlers and Workers. 0 means that the city can grow and train at the same time.<br /><br />
! style="background:#efefef;" | Description
<bNoBadGoodies></bNoBadGoodies> Is set to 1 for Scouts and Explorers; means that Tribal Villages will never attack this unit.<br /><br />
|-
<bOnlyDefensive></bOnlyDefensive> If set to 1, the unit cannot attack other units.<br /><br />
! EarlyArtDefineTag
<bNoCapture></bNoCapture> If set to 1, the unit cannot take cities, even when there are no units in them.<br /><br />
| From CIV4ArtDefinesUnit - what the unit looks like in-game during the early era(s).
<bQuickCombat></bQuickCombat> Always set to 0; not sure what it does.<br /><br />
|-
<bRivalTerritory></bRivalTerritory> If set to 1, the unit can enter enemy territory without declaring war.<br /><br />
! FormationType
<bMilitaryHappiness></bMilitaryHappiness> If set to 1, the unit is treated as a military unit by the people of a city in terms of deciding whether they are angry about lack of protection or happy from the Monarchy civic<br /><br />
| The formation that the unit adopts.
<bMilitarySupport></bMilitarySupport> If set to 1, counts as a military unit for the penalty posed by Pacifism and other bonusus/penalties like that.<br /><br />
|-
<bMilitaryProduction></bMilitaryProduction> If set to 1, the unit counts as a military unit for the purposes of production and any bonuses and penalties applied on the prodution of military units.<br /><br />
! fMaxSpeed
<bPillage></bPillage> If set to 1, the unit can pillage enemy tiles<br /><br />
| <font color=red>Not sure what this does.</font> Perhaps the maximum speed at which the unit's animations play?
<bSpy></bSpy> If set to 1, the unit is a spy<br /><br />
|-
<bSabotage></bSabotage> In Vanilla and Warlords, this means that the unit can sabotage production like a Spy in an enemy city. It should be 0 in BTS.<br /><br />
! fPadTime
<bDestroy></bDestroy> As above, but for Destroy Improvement<br /><br />
| <font color=red>Not sure what this does.</font> Perhaps the amount of time (in seconds) inserted between certain animations?
<bStealPlans></bStealPlans> As above, for Steal Plans<br /><br />
|-
<bInvestigate></bInvestigate> As above, for Investigate City<br /><br />
! iGroupSize
<bCounterSpy></bCounterSpy> As above, for Perform Counterespionage.<br /><br />
| The number of models in the unit; ex. 3 for a Warrior unit, 1 for a Jet Fighter unit.
<bFound></bFound> If set to 1, the unit can found a new city.<br /><br />
|-
<bGoldenAge></bGoldenAge> If set to 1, the unit counts as a Great Person to start a Golden Age.<br /><br />
! iMeleeWaveSize
<bInvisible></bInvisible> If set to 1, is invisible to all units.<br /><br />
| The number of models that engage in melee combat at once. Should never be greater than iGroupSize.
<bFirstStrikeImmune></bFirstStrikeImmune> If set to 1, the unit is immune to all first strikes.<br /><br />
|-
<bNoDefensiveBonus></bNoDefensiveBonus> If set to 1, the unit does not recieve defensive bonuses<br /><br />
! iRangedWaveSize
<bIgnoreBuildingDefense></bIgnoreBuildingDefense> If set to 1, the unit ignores defensive bonuses from enemy walls and castles, like a Gunpowder unit.<br /><br />
| The number of models that engage in ranged combat at once. Should never be greater than iGroupSize.
<bCanMoveImpassable></bCanMoveImpassable> If set to 1, the unit can move under ice. Used for Submarines.<br /><br />
|-
<bCanMoveAllTerrain></bCanMoveAllTerrain> If set to 1, the unit can move over all terrain.<br /><br />
! LateArtDefineTag
<bFlatMovementCost></bFlatMovementCost> If set to 1, the unit pays this fixed price to enter all terrain.<br /><br />
| From CIV4ArtDefinesUnit - what the unit looks like in-game during the middle era(s).
<bIgnoreTerrainCost></bIgnoreTerrainCost> If set to 1, the unit ignores the cost of terrain to move into.<br /><br />
|-
<bNukeImmune></bNukeImmune> If set to 1, the unit is immune to damage from nukes.<br /><br />
! MiddleArtDefineTag
<bPrereqBonuses></bPrereqBonuses> Set to 0 for all unit except Work Boats. Not sure what it does.<br /><br />
| From CIV4ArtDefinesUnit - what the unit looks like in-game during the late era(s).
<bPrereqReligion></bPrereqReligion> If set to 1, the unit requires the State Religion to be present in the city.<br /><br />
|-
<bMechanized></bMechanized> Not sure what this does. Can be 1 or 0.<br /><br />
! UnitMeshGroups
<bSuicide></bSuicide> If set to 1, the unit dies when it makes an attack<br /><br />
| The ART_DEF tag for the unit's model/animation/etc information.
<bHiddenNationality></bHiddenNationality> If set to 1, the unit bears no marking of nationality.<br /><br />
|-
<bAlwaysHostile></bAlwaysHostile> If set to 1, can attack the enemy without declaring war.<br /><br />
|}
 
List Tags
 
<UnitClassUpgrades></UnitClassUpgrades> Inside here you put all of the unit classes which the unit upgrades to.<br />
<UnitClassUpgrade></UnitClassUpgrade> Enclose in this tag everything which the unit upgrades to.<br /><br />
<UnitClassTargets></UnitClassTargets> Not sure what this does.<br />
<UnitCombatTargets></UnitCombatTargets> Same as above<br /><br />
<UnitClassDefenders></UnitClassDefenders> Same as above <br />
<UnitCombatDefenders></UnitCombatDefenders> Same as above <br /><br />
<FlankingStrikes></FlankingStrikes> All Flank Attacks which the unit gets should go under here.<br />
<FlankingStrike></FlankingStrike> Put the unit and number of Flanking Strikes here.<br /><br />
<UnitAIs></UnitAIs> Inside here go the methods which the AI uses to command this unit.<br />
<UnitAI></UnitAI> Put each AI in here.<br /><br />
<NotUnitAIs></NotUnitAIs> As <UnitAIs>, but for the tasks which the AI will never consider the unit for.<br />
<NotUnitAI></NotUnitAI> As above for <UnitAI><br /><br />
<Builds></Builds> For all the things that the unit can build on tiles<br />
<Build></Build> Each thing that the unit can build goes in one of these.<br /><br />
<ReligionSpreads></ReligionSpreads> Put the religions which the unit can spread here. <br />
<ReligionSpread></ReligionSpread> Each religion goes in here<br /><br />
<CorporationSpreads></CorporationSpreads> As above for <ReligionSpreads><br />
<CorporationSpread></CorporationSpread> As above for <ReligionSpread><br /><br />
<GreatPeoples></GreatPeoples> The types of Super Specialist that this person can become<br />
<GreatPeopleType></GreatPeopleType> Each type of Super Specialist goes in here.<br /><br />
<Buildings></Buildings> All of the things that the unit can construct in a city go here.<br />
<Building></Building> Each building goes in one of these<br /><br />
<ForceBuildings></ForceBuildings> Don't know what this does<br /><br />
 
 
Preresquisite Tags
 
<HolyCity></HolyCity> If not NONE, then it is the Holy City needed to build the unit.<br /><br />
<ReligionType></ReligionType> For units, always NONE.<br /><br />
<StateReligion></StateReligion> If not NONE, the State Religion needed to build this unit<br /><br />
<PrereqReligion></PrereqReligion> As above for Religion<br /><br />
<PrereqCorporation></PrereqCorporation> As above for Corporation<br /><br />
<PrereqBuilding></PrereqBuilding> As above for building<br /><br />
<PrereqTech></PrereqTech> As above for technology
<TechTypes></TechTypes> Encloses the above
<BonusType></BonusType> If not NONE, the resource needed to build the unit<br /><br />
<PrereqBonuses></PrereqBonuses> Don't know what this does<br /><br />
<ProductionTraits></ProductionTraits> The leader traits which affect production of this unit<br /><br />
<Flavors><Flavors> The 'flavors' of a unit - not sure what they do<br /><br />
 
 
Integer Tags
 
 
<iAIWeight></iAIWeight> The preference given by the AI to this unit<br /><br />
<iCost></iCost> The cost in hammers of the unit<br /><br />
<iHurryCostModifier></iHurryCostModifier> The number by which you multiply the cost to get the hurry cost<br /><br />
<iAdvancedStartCost></iAdvancedStartCost> The cost on Advanced Start<br /><br />
<iAdvancedStartCostIncrease></iAdvancedStartCostIncrease> The increase in cost on Advanced Start<br /><br />
<iMinAreaSize></iMinAreaSize> Don't know what this does<br /><br />
<iMoves></iMoves>The number of moves a unit has<br /><br />
<bNoRevealMap></bNoRevealMap> If 1, the unit does not reveal the map <br /><br />
<iAirRange></iAirRange> For Air Units, the range<br /><br />
<iAirUnitCap></iAirUnitCap> Should be 0 <br /><br />
<iDropRange></iDropRange> The range which the unit can parachute-jump<br /><br />
<iNukeRange></iNukeRange> The range at which the 'nuke' can be launched (0 for non-nukes)<br /><br />
<iWorkRate></iWorkRate> The rate at which the unit improves tiles<br /><br />
<iBaseDiscover></iBaseDiscover> The rate at which a unit discovers tiles <br /><br />
<iDiscoverMultiplier></iDiscoverMultiplier> Affects the rate at which the unit discovers tiles<br /><br />
<iBaseHurry></iBaseHurry> No idea<br /><br />
<iHurryMultiplier></iHurryMultiplier> Like <iDiscoverMultiplier><br /><br />
<iBaseTrade></iBaseTrade> No idea<br /><br />
<iTradeMultiplier></iTradeMultiplier> See above <br /><br />
<iGreatWorkCulture></iGreatWorkCulture> The amount of culture that the unit can generate from a Great Work<br /><br />
<iEspionagePoints></iEspionagePoints> Used for spies <br /><br />
<TerrainImpassables></TerrainImpassables><br /><br />
<FeatureImpassables/><br /><br />
<TerrainPassableTechs/><br /><br />
<FeaturePassableTechs/><br /><br />
<iCombat>2</iCombat><br /><br />
<iCombatLimit>100</iCombatLimit><br /><br />
<iAirCombat>0</iAirCombat><br /><br />
<iAirCombatLimit>0</iAirCombatLimit><br /><br />
<iXPValueAttack>4</iXPValueAttack><br /><br />
<iXPValueDefense>2</iXPValueDefense><br /><br />
<iFirstStrikes>0</iFirstStrikes><br /><br />
<iChanceFirstStrikes>0</iChanceFirstStrikes><br /><br />
<iInterceptionProbability>0</iInterceptionProbability><br /><br />
<iEvasionProbability>0</iEvasionProbability><br /><br />
<iWithdrawalProb>0</iWithdrawalProb><br /><br />
<iCollateralDamage>0</iCollateralDamage><br /><br />
<iCollateralDamageLimit>0</iCollateralDamageLimit><br /><br />
<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits><br /><br />
<iCityAttack>0</iCityAttack><br /><br />
<iCityDefense>0</iCityDefense><br /><br />
<iAnimalCombat>0</iAnimalCombat><br /><br />
<iHillsAttack>0</iHillsAttack><br /><br />
<iHillsDefense>0</iHillsDefense><br /><br />
<TerrainNatives><br /><br />
<TerrainNative></TerrainNative><br /><br />
<FeatureNatives/><br /><br />
<TerrainAttacks/><br /><br />
<TerrainDefenses/><br /><br />
<FeatureAttacks/><br /><br />
<FeatureDefenses/><br /><br />
<UnitClassAttackMods/><br /><br />
<UnitClassDefenseMods/><br /><br />
<UnitCombatMods/><br /><br />
<UnitCombatCollateralImmunes/><br /><br />
<DomainMods/><br /><br />
<BonusProductionModifiers/><br /><br />
<iBombRate>0</iBombRate><br /><br />
<iBombardRate>0</iBombardRate><br /><br />
<SpecialCargo>NONE</SpecialCargo><br /><br />
<DomainCargo>NONE</DomainCargo><br /><br />
'''<iCargo></iCargo>''' The number of units that it can carry<br /><br />
 
Misc Tags
 
'''<iConscription></iConscription>''' If 1, the unit can be Drafted <br /><br />
<iCultureGarrison></iCultureGarrison> Don't know what this does <br /><br />
<iExtraCost></iExtraCost>
<iAsset>0</iAsset>
<iPower>0</iPower>




Art Tags
==Example==
<UnitInfo>
  <Class>UNITCLASS_LION</Class>
  <Type>UNIT_LION</Type>
  <UniqueNames/>
  <Special>NONE</Special>
  <Capture>NONE</Capture>
  <Combat>NONE</Combat>
  <Domain>DOMAIN_LAND</Domain>
  <DefaultUnitAI>UNITAI_ANIMAL</DefaultUnitAI>
  <Invisible>NONE</Invisible>
  <SeeInvisible>NONE</SeeInvisible>
  <Description>TXT_KEY_UNIT_LION</Description>
  <Civilopedia>TXT_KEY_CONCEPT_ANIMALS_PEDIA</Civilopedia>
  <Strategy>TXT_KEY_UNIT_ANIMAL_STRATEGY</Strategy>
  <Advisor>NONE</Advisor>
  <bAnimal>1</bAnimal>
  <bFood>0</bFood>
  <bNoBadGoodies>0</bNoBadGoodies>
  <bOnlyDefensive>0</bOnlyDefensive>
  <bNoCapture>0</bNoCapture>
  <bQuickCombat>0</bQuickCombat>
  <bRivalTerritory>0</bRivalTerritory>
  <bMilitaryHappiness>0</bMilitaryHappiness>
  <bMilitarySupport>0</bMilitarySupport>
  <bMilitaryProduction>0</bMilitaryProduction>
  <bPillage>0</bPillage>
  <bSpy>0</bSpy>
  <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>1</bNoDefensiveBonus>
  <bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>
  <bCanMoveImpassable>0</bCanMoveImpassable>
  <bCanMoveAllTerrain>0</bCanMoveAllTerrain>
  <bFlatMovementCost>0</bFlatMovementCost>
  <bIgnoreTerrainCost>0</bIgnoreTerrainCost>
  <bNukeImmune>0</bNukeImmune>
  <bPrereqBonuses>0</bPrereqBonuses>
  <bPrereqReligion>0</bPrereqReligion>
  <bMechanized>0</bMechanized>
  <bSuicide>0</bSuicide>
  <bHiddenNationality>0</bHiddenNationality>
  <bAlwaysHostile>0</bAlwaysHostile>
  <UnitClassUpgrades/>
  <UnitClassTargets/>
  <UnitCombatTargets/>
  <UnitClassDefenders/>
  <UnitCombatDefenders/>
  <FlankingStrikes/>
  <UnitAIs>
      <UnitAI>
        <UnitAIType>UNITAI_ANIMAL</UnitAIType>
        <bUnitAI>1</bUnitAI>
      </UnitAI>
  </UnitAIs>
  <NotUnitAIs/>
  <Builds/>
  <ReligionSpreads/>
  <CorporationSpreads/>
  <GreatPeoples/>
  <Buildings/>
  <ForceBuildings/>
  <HolyCity>NONE</HolyCity>
  <ReligionType>NONE</ReligionType>
  <StateReligion>NONE</StateReligion>
  <PrereqReligion>NONE</PrereqReligion>
  <PrereqCorporation>NONE</PrereqCorporation>
  <PrereqBuilding>NONE</PrereqBuilding>
  <PrereqTech>NONE</PrereqTech>
  <TechTypes/>
  <BonusType>NONE</BonusType>
  <PrereqBonuses/>
  <ProductionTraits/>
  <Flavors/>
  <iAIWeight>0</iAIWeight>
  <iCost>-1</iCost>
  <iHurryCostModifier>0</iHurryCostModifier>
  <iAdvancedStartCost>-1</iAdvancedStartCost>
  <iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
  <iMinAreaSize>-1</iMinAreaSize>
  <iMoves>1</iMoves>
  <bNoRevealMap>0</bNoRevealMap>
  <iAirRange>0</iAirRange>
  <iAirUnitCap>0</iAirUnitCap>
  <iDropRange>0</iDropRange>
  <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>
  <iEspionagePoints>0</iEspionagePoints>
  <TerrainImpassables/>
  <FeatureImpassables/>
  <TerrainPassableTechs/>
  <FeaturePassableTechs/>
  <iCombat>2</iCombat>
  <iCombatLimit>100</iCombatLimit>
  <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>0</iCityDefense>
  <iAnimalCombat>0</iAnimalCombat>
  <iHillsAttack>0</iHillsAttack>
  <iHillsDefense>0</iHillsDefense>
  <TerrainNatives>
      <TerrainNative>
        <TerrainType>TERRAIN_GRASS</TerrainType>
        <bTerrainNative>1</bTerrainNative>
      </TerrainNative>
      <TerrainNative>
        <TerrainType>TERRAIN_PLAINS</TerrainType>
        <bTerrainNative>1</bTerrainNative>
      </TerrainNative>
      <TerrainNative>
        <TerrainType>TERRAIN_DESERT</TerrainType>
        <bTerrainNative>1</bTerrainNative>
      </TerrainNative>
  </TerrainNatives>
  <FeatureNatives/>
  <TerrainAttacks/>
  <TerrainDefenses/>
  <FeatureAttacks/>
  <FeatureDefenses/>
  <UnitClassAttackMods/>
  <UnitClassDefenseMods/>
  <UnitCombatMods/>
  <UnitCombatCollateralImmunes/>
  <DomainMods/>
  <BonusProductionModifiers/>
  <iBombRate>0</iBombRate>
  <iBombardRate>0</iBombardRate>
  <SpecialCargo>NONE</SpecialCargo>
  <DomainCargo>NONE</DomainCargo>
  <iCargo>0</iCargo>
  <iConscription>0</iConscription>
  <iCultureGarrison>0</iCultureGarrison>
  <iExtraCost>0</iExtraCost>
  <iAsset>1</iAsset>
  <iPower>1</iPower>
  <UnitMeshGroups>
      <iGroupSize>3</iGroupSize>
      <fMaxSpeed>1.75</fMaxSpeed>
      <fPadTime>1</fPadTime>
      <iMeleeWaveSize>3</iMeleeWaveSize>
      <iRangedWaveSize>0</iRangedWaveSize>
      <UnitMeshGroup>
        <iRequired>3</iRequired>
        <EarlyArtDefineTag>ART_DEF_UNIT_LION</EarlyArtDefineTag>
      </UnitMeshGroup>
  </UnitMeshGroups>
  <FormationType>FORMATION_TYPE_ANIMAL</FormationType>
  <HotKey/>
  <bAltDown>0</bAltDown>
  <bShiftDown>0</bShiftDown>
  <bCtrlDown>0</bCtrlDown>
  <iHotKeyPriority>0</iHotKeyPriority>
  <FreePromotions/>
  <LeaderPromotion>NONE</LeaderPromotion>
  <iLeaderExperience>0</iLeaderExperience>
</UnitInfo>


<UnitMeshGroups>
{{Civ4_XML_Files}}
<iGroupSize>3</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>3</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_LION</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<FormationType>FORMATION_TYPE_ANIMAL</FormationType>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions/>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>

Latest revision as of 01:16, 3 October 2011

The Civ4UnitInfos XML file controls data related to individual units: for example, a unit's strength value or production cost. There are also more detailed options, affecting things like transport capabilities, prerequisites, and other complex features.

All tags must be opened and closed; the first is the 'open', the second the 'closed' 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

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
Capture Either NONE, or the unit which the unit turns into when captured.
Class The class as defined in CIV4UnitClassInfos.xml. Class is the thing that holds, say, a Swordsman and a Praetorian together; each civilization can only have one of each class.
Combat The combat type, out of UNITCOMBAT_MELEE, UNITCOMBAT_ARCHER, UNITCOMBAT_MOUNTED, UNITCOMBAT_GUN, UNITCOMBAT_SIEGE, UNITCOMBAT_NAVAL, UNITCOMBAT_AIR and UNITCOMBAT_HELICOPTER of the unit - used to determine bonuses in combat & defense.
Domain DOMAIN_ - then AIR, SEA or LAND.
DefaultUnitAI The default way in which the AI uses the unit.
Invisible Either NONE (either meaning not invisible or completely invisible, see below) or INVISIBLE_STEALTH or INVISIBLE_SUBMARINE.
SeeInvisible Either NONE or a category of invisibility above. Means that the unit can see all units with this type of invisibility.
Special Should be NONE unless it comes under a heading in CIV4SpecialUnitInfos.xml; in which case write that.
Type The name of the unit; which must be unique.
UnitInfo Each different unit's data is enclosed in a seperate tag like this.
UnitInfos This begins and ends the file. Everything must go in between these two, or it will not work.
UniqueNames Can be used to make the same unit have seperate names. kinda the same as cities. Can either contain text or a text tag


Prerequisites

These tags must be included when writing new entries, or the game will crash or otherwise malfunction.

Tag Name Description
AdvancedStartCost The cost in points of the unit on Advanced Start.
AdvancedStartCostIncrease Affects the cost in points of the unit on Advanced Start.
BonusType The resource needed to build this unit.
Flavors The 'flavours' of the unit - these relate to leader behavior in the AI.
HolyCity If not NONE, then it is the Holy City needed to build the unit.
HurryCostModifier Impacts the Gold Hurry cost of the unit.
MinAreaSize Minimal number of water squares needed nearby to build sea vessels (20 for all sea units except Work Boats).
Moves The number of movement points that the unit has.
PrereqBonuses Used as a list tag to enclose BonusType tags.
PrereqBuilding Either NONE, or the building needed in a city to build this unit.
PrereqCorporation Either NONE, or the corporation needed in a city to build this unit.
PrereqReligion Either NONE, or the religion needed in a city to build this unit.
PrereqTech Either NONE, or the technology that you need to build this unit.
ProductionTraits The leader traits which affect production of this unit, along with the value.
ReligionType For units, always NONE.
StateReligion If not NONE, the State Religion needed to build this unit.
TechTypes Used as a list tag to enclose PrereqTech tags.


Text

Tag Name Description
Advisor Almost always ADVISOR_MILITARY; the rationale that the game gives for reccomending the unit.
Civilopedia As above for the Civiliopedia entry.
Description Either text or a key from the text files. The name displayed for the unit.
Help Optional. A text that can include some more information to display. The text is specified in any of the Assets\XML\Text files.
Strategy As above for the Sid's Tips, also displayed above the Civilopedia entry.


Integers

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

Tag Name Description
iAirCombat The unit's base strength for Air Units.
iAirCombatLimit Max amount of damage (in percent) able to be inflicted on enemy units when air striking.
iAirRange The range at which an air unit it can operate or the range at which a ground unit can attack.
iAirUnitCap The number of air unit capacity slots the unit takes up -- should be 1 for most, if not all, air units.
iAIWeight The preference given by the AI to this unit, generally for Unique Units.
iAnimalCombat The percent bonus that the unit gets against Animals, in attack and defense.
iAsset Affects the AI's behaviour towards it in some way.
iBaseDiscover The basic rate at which the unit researches technologies.
iBaseHurry Amount of production in a city the unit can hurry.
iBaseTrade The basic amount of money that the unit makes from a Trade Mission.
iBombardRate The rate at which a unit Bombards a city.
iBombRate The damage that a unit does when carrying out an Air Bomb mission.
iCargo The number of units that the unit can carry.
iChanceFirstStrikes The number of First Strike Chances that the unit has.
iCityAttack The percent bonus that the unit gets when attacking cities.
iCityDefense The percent bonus that the unit gets when defending cities.
iCollateralDamage The amount of collateral damage (in percent) that the unit deals.
iCollateralDamageLimit The maximum amount of collateral damage that the unit can deal.
iCollateralDamageMaxUnits The greatest number of enemy units that the unit can inflict collateral damage on.
iConscription The number of this unit that can be drafted.
iCombat The unit's base strength.
iCombatLimit Percentage that tells how much damage a unit can give out before retreating.
iCost The cost in hammers of the unit.
iCultureGarrison The suppression value of a unit while garrisoned in a rebelling city.
iDiscoverMultiplier Affects the rate at which the unit researches technologies.
iDropRange The range at which the unit can 'jump'/paradrop from a friendly city.
iEspionagePoints Used for Spy Units (ex. Great Spy) - the number of espionage points the unit can generate when infiltrating an enemy city.
iEvasionProbability For air and parachute units; the odds of evading interception.
iExtraCost Affects the upkeep (in gold per turn) of the unit; ex. a value of 1 equals +1 gold per turn cost.
iFirstStrikes The number of automatic First Strikes that the unit has.
iGreatWorkCulture The amount of culture that the unit generates with a Great Work.
iHillsAttack The percent bonus that the unit gets when attacking hills.
iHillsDefense The percent bonus that the unit gets when defending hills.
iHotKeyPriority Not sure what this does.
iHurryMultiplier Multiplier of the above.
iInterceptionProbability The percent odds a unit has of intercepting an enemy unit within range trying to carry out an air mission.
iLeaderExperience The amount of experience this unit gives to units in the same stack when leading as a warlord; used for Great Generals.
iNukeRange The range at which the 'nuke' can be launched - missiles only.
iOrderPriority Optional. Not sure what this does.
iPower Affects the amount that the AI factors it into the equation when determining your military power.
iTradeMultiplier Affects the amount of money that the unit makes from a Trade Mission.
iWithdrawalProb The percent withdrawal chance the unit has. Maximum Value is in GlobalDefines.xml
iWorkRate The rate at which the unit improves tiles.
iXPValueAttack The value, in Experience Points, that this unit is worth on the attack.
iXPValueDefense The value, in Experience Points, that this unit is worth on the defense.

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
bAltDown If 1, the hotkey for this unit must be used with Alt.
bAlwaysHostile Can attack enemy units without declaring war, and can be attacked without triggering a war. All nations treat it as an enemy unit.
bAnimal The unit is an animal; the Barbarian State controls it, it can spring from anywhere and it cannot enter cultural borders.
bCanMoveImpassible If set to 1, the unit can move through impassable terrain; ex. submarines moving through ice, helicopters moving through peaks.
bCanMoveAllTerrain Can move across all terrain.
bCounterSpy Should only be 1 in Vanilla or Warlords; can Perform Counterespionage.
bCtrlDown If 1, the hotkey for this unit must be used with Ctrl.
bDestroy Should only be 1 in Vanilla or Warlords; can Destroy Improvements.
bFirstStrikeImmune Is immune to First Strikes.
bFlatMovementCost Pays a flat movement cost to enter all terrain.
bFood The unit is produced with food as well as hammers; a city does not generate food while building this unit.
bFound Can found a city.
bGoldenAge Counts as a Great Person to start a Golden Age.
bHiddenNationality Bears no marking of nationality.
bIgnoreBuildingDefense Ignores defensive bonuses from enemy buildings, like Walls and Castles.
bIgnoreTerrainCost Ignores movement penalties from terrain.
bInvestigate Should only be 1 in Vanilla or Warlords; can Investigate City.
bInvisible Is invisible to all units.
bLineOfSight Optional. Specifies if the unit can only reveal the content in the tiles in the direction he is facing.
bMechanized Likely affects the sounds played when selecting the unit or issuing it orders (i.e. mechanical noises as opposed to human voices).

Used for land units in a vehicle, air units, sea units, etc.

bMilitaryHappiness Counts as a Military Unit in the eyes of the rabble; contributes to the "+happy for each military unit in a city" civic modifier.
bMilitaryProduction Counts as a military unit for production bonuses/penalties.
bMilitarySupport Costs money to maintain as part of your military, affected by Pacifism and the like.
bNoBadGoodies When this unit is entering a Tribal Village, the villagers will never be hostile.
bNoCapture This unit cannot capture cities.
bNoDefensiveBonus Does not receive defensive bonuses.
bNoRevealMap If 1, the unit does not reveal any tiles except the one it is currently standing on.
bNukeInnume Takes no damage from nukes.
bOnlyDefensive This unit cannot attack other units.
bPillage Can pillage improvements.
bQuickCombat Always 0 in vanilla BtS; if set to 1, presumably the unit never triggers the camera-angle change and other battle effects when combating another unit.
bRenderAlways Optional. Unknown usage.
bRenderBelowWater Optional. Unknown usage.
bRivalTerritory Can explore rival territory.
bPrereqBonuses Needs the mentioned resources to be built (can be NONE).
bPrereqReligion Needs the mentioned religion to be built (can be NONE).
bSabotage Should only be 1 in Vanilla or Warlords; can Sabotage Production.
bShiftDown If 1, the hotkey for this unit must be used with Shift.
bSpy Is a spy.
bStealPlans Should only be 1 in Vanilla or Warlords; can Steal Plans.
bSuicide Kills itself upon attacking, like a Kamikaze in the Defense mod.


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
Builds For all the things that the unit can build on tiles; but not wonders that it can build in cities.
Buildings The buildings which the unit can construct in a friendly city.
CorporationSpreads The Corporations which the unit can spread.
FlankingStrikes All unit classes against which the unit gets a Flank Attack.
ForceBuildings The buildings the unit can construct in any city regardless of tech, building prerequisites, or other restrictions (ex: could construct a world wonder in multiple cities).
GreatPeoples If the unit can settle in a city, put the type of specialist it becomes here.
NotUnitAIs As UnitAIs, but for the tasks which the AI will never consider the unit for.
ReligionSpreads The religions which the unit can spread.
UnitClassDefenders Unit defends first against the specified unitclass(es).
UnitClassTargets Unit attacks first against the specified unitclass(es).
UnitClassUpgrades The UnitClass(es) to which this unit upgrades.
UnitCombatDefenders Unit defends first against the specified unitcombat type(s)
UnitCombatTargets Unit attacks first against the specified unitcombat type(s)
UnitAIs Inside here go the methods which the AI uses to command this unit. It dictates the roles which the unit is good for.

Miscellaneous

Tag Name Description
BonusProductionModifiers Resources that make the unit produce faster.
DomainCargo The Domain (AIR, SEA, or LAND) of units that the unit can carry.
DomainMods The bonuses/penalties that the unit gets against Air, Sea or Land units.
FeatureAttacks Attack bonus(es) that the unit gets when attacking into different features.
FeatureDefenses Defense bonus(es) that the unit gets from within different features.
FeatureImpassables Used to specify terrain features (Jungle, Forest, etc.) that the unit is unable to enter.
FeatureNatives This affects the feature types animals spawn in.
FreePromotions The promotions that this unit starts with.
HotKey Never used in the original game - it can be used to define a hotkey for the unit.
LeaderPromotion Promotion that the unit gives to another unit when attached as a warlord; used in vanilla BtS for Great Generals.
SpecialCargo The type of SpecialUnit that the unit can carry.
TerrainAttacks Attack bonuses that the unit gets in different terrain.
TerrainDefenses Defense bonuses that the unit gets in different terrain.
TerrainImpassables Used to specify terrain types (Ocean, Desert, etc.) that the unit is unable to enter.
TerrainNatives This affects the terrain types animals spawn in.
TerrainPassableTechs With these technologies, the unit can enter the terrain defined in TerrainImpassables.
UnitClassAttackMods The percent bonuses/penalties that the unit gets against specific UnitClasses in attack.
UnitClassDefenseMods The percent bonuses/penalties that the unit gets against specific UnitClasses in defense.
UnitCombatCollateralImmunes The UnitCombat(s) that this unit does not receive collateral damage from.
UnitCombatMods The percent bonuses/penalties that the unit gets against different UnitCombat groups.


Art

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

Tag Name Description
EarlyArtDefineTag From CIV4ArtDefinesUnit - what the unit looks like in-game during the early era(s).
FormationType The formation that the unit adopts.
fMaxSpeed Not sure what this does. Perhaps the maximum speed at which the unit's animations play?
fPadTime Not sure what this does. Perhaps the amount of time (in seconds) inserted between certain animations?
iGroupSize The number of models in the unit; ex. 3 for a Warrior unit, 1 for a Jet Fighter unit.
iMeleeWaveSize The number of models that engage in melee combat at once. Should never be greater than iGroupSize.
iRangedWaveSize The number of models that engage in ranged combat at once. Should never be greater than iGroupSize.
LateArtDefineTag From CIV4ArtDefinesUnit - what the unit looks like in-game during the middle era(s).
MiddleArtDefineTag From CIV4ArtDefinesUnit - what the unit looks like in-game during the late era(s).
UnitMeshGroups The ART_DEF tag for the unit's model/animation/etc information.


Example

<UnitInfo>
  <Class>UNITCLASS_LION</Class>
  <Type>UNIT_LION</Type>
  <UniqueNames/>
  <Special>NONE</Special>
  <Capture>NONE</Capture>
  <Combat>NONE</Combat>
  <Domain>DOMAIN_LAND</Domain>
  <DefaultUnitAI>UNITAI_ANIMAL</DefaultUnitAI>
  <Invisible>NONE</Invisible>
  <SeeInvisible>NONE</SeeInvisible>
  <Description>TXT_KEY_UNIT_LION</Description>
  <Civilopedia>TXT_KEY_CONCEPT_ANIMALS_PEDIA</Civilopedia>
  <Strategy>TXT_KEY_UNIT_ANIMAL_STRATEGY</Strategy>
  <Advisor>NONE</Advisor>
  <bAnimal>1</bAnimal>
  <bFood>0</bFood>
  <bNoBadGoodies>0</bNoBadGoodies>
  <bOnlyDefensive>0</bOnlyDefensive>
  <bNoCapture>0</bNoCapture>
  <bQuickCombat>0</bQuickCombat>
  <bRivalTerritory>0</bRivalTerritory>
  <bMilitaryHappiness>0</bMilitaryHappiness>
  <bMilitarySupport>0</bMilitarySupport>
  <bMilitaryProduction>0</bMilitaryProduction>
  <bPillage>0</bPillage>
  <bSpy>0</bSpy>
  <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>1</bNoDefensiveBonus>
  <bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>
  <bCanMoveImpassable>0</bCanMoveImpassable>
  <bCanMoveAllTerrain>0</bCanMoveAllTerrain>
  <bFlatMovementCost>0</bFlatMovementCost>
  <bIgnoreTerrainCost>0</bIgnoreTerrainCost>
  <bNukeImmune>0</bNukeImmune>
  <bPrereqBonuses>0</bPrereqBonuses>
  <bPrereqReligion>0</bPrereqReligion>
  <bMechanized>0</bMechanized>
  <bSuicide>0</bSuicide>
  <bHiddenNationality>0</bHiddenNationality>
  <bAlwaysHostile>0</bAlwaysHostile>
  <UnitClassUpgrades/>
  <UnitClassTargets/>
  <UnitCombatTargets/>
  <UnitClassDefenders/>
  <UnitCombatDefenders/>
  <FlankingStrikes/>
  <UnitAIs>
     <UnitAI>
        <UnitAIType>UNITAI_ANIMAL</UnitAIType>
        <bUnitAI>1</bUnitAI>
     </UnitAI>
  </UnitAIs>
  <NotUnitAIs/>
  <Builds/>
  <ReligionSpreads/>
  <CorporationSpreads/>
  <GreatPeoples/>
  <Buildings/>
  <ForceBuildings/>
  <HolyCity>NONE</HolyCity>
  <ReligionType>NONE</ReligionType>
  <StateReligion>NONE</StateReligion>
  <PrereqReligion>NONE</PrereqReligion>
  <PrereqCorporation>NONE</PrereqCorporation>
  <PrereqBuilding>NONE</PrereqBuilding>
  <PrereqTech>NONE</PrereqTech>
  <TechTypes/>
  <BonusType>NONE</BonusType>
  <PrereqBonuses/>
  <ProductionTraits/>
  <Flavors/>
  <iAIWeight>0</iAIWeight>
  <iCost>-1</iCost>
  <iHurryCostModifier>0</iHurryCostModifier>
  <iAdvancedStartCost>-1</iAdvancedStartCost>
  <iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
  <iMinAreaSize>-1</iMinAreaSize>
  <iMoves>1</iMoves>
  <bNoRevealMap>0</bNoRevealMap>
  <iAirRange>0</iAirRange>
  <iAirUnitCap>0</iAirUnitCap>
  <iDropRange>0</iDropRange>
  <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>
  <iEspionagePoints>0</iEspionagePoints>
  <TerrainImpassables/>
  <FeatureImpassables/>
  <TerrainPassableTechs/>
  <FeaturePassableTechs/>
  <iCombat>2</iCombat>
  <iCombatLimit>100</iCombatLimit>
  <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>0</iCityDefense>
  <iAnimalCombat>0</iAnimalCombat>
  <iHillsAttack>0</iHillsAttack>
  <iHillsDefense>0</iHillsDefense>
  <TerrainNatives>
     <TerrainNative>
        <TerrainType>TERRAIN_GRASS</TerrainType>
        <bTerrainNative>1</bTerrainNative>
     </TerrainNative>
     <TerrainNative>
        <TerrainType>TERRAIN_PLAINS</TerrainType>
        <bTerrainNative>1</bTerrainNative>
     </TerrainNative>
     <TerrainNative>
        <TerrainType>TERRAIN_DESERT</TerrainType>
        <bTerrainNative>1</bTerrainNative>
     </TerrainNative>
  </TerrainNatives>
  <FeatureNatives/>
  <TerrainAttacks/>
  <TerrainDefenses/>
  <FeatureAttacks/>
  <FeatureDefenses/>
  <UnitClassAttackMods/>
  <UnitClassDefenseMods/>
  <UnitCombatMods/>
  <UnitCombatCollateralImmunes/>
  <DomainMods/>
  <BonusProductionModifiers/>
  <iBombRate>0</iBombRate>
  <iBombardRate>0</iBombardRate>
  <SpecialCargo>NONE</SpecialCargo>
  <DomainCargo>NONE</DomainCargo>
  <iCargo>0</iCargo>
  <iConscription>0</iConscription>
  <iCultureGarrison>0</iCultureGarrison>
  <iExtraCost>0</iExtraCost>
  <iAsset>1</iAsset>
  <iPower>1</iPower>
  <UnitMeshGroups>
     <iGroupSize>3</iGroupSize>
     <fMaxSpeed>1.75</fMaxSpeed>
     <fPadTime>1</fPadTime>
     <iMeleeWaveSize>3</iMeleeWaveSize>
     <iRangedWaveSize>0</iRangedWaveSize>
     <UnitMeshGroup>
        <iRequired>3</iRequired>
        <EarlyArtDefineTag>ART_DEF_UNIT_LION</EarlyArtDefineTag>
     </UnitMeshGroup>
  </UnitMeshGroups>
  <FormationType>FORMATION_TYPE_ANIMAL</FormationType>
  <HotKey/>
  <bAltDown>0</bAltDown>
  <bShiftDown>0</bShiftDown>
  <bCtrlDown>0</bCtrlDown>
  <iHotKeyPriority>0</iHotKeyPriority>
  <FreePromotions/>
  <LeaderPromotion>NONE</LeaderPromotion>
  <iLeaderExperience>0</iLeaderExperience>
</UnitInfo>


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