Civ4UnitInfos: Difference between revisions
Flying Pig (talk | contribs) |
Flying Pig (talk | contribs) |
||
Line 227: | Line 227: | ||
== Prerequisite Tags == | == Prerequisite Tags == | ||
{| class="wikitable" border="1" style="text-align:left" cellpadding="5" | |||
|- | |||
! Tag !! Usage | |||
|- | |||
! HolyCity | |||
| If not NONE, then it is the Holy City needed to build the unit | |||
|- | |||
! ReligionType | |||
| For units, always NONE. | |||
|- | |||
! StateReligion | |||
| If not NONE, the State Religion needed to build this unit | |||
|- | |||
! PrereqReligion | |||
| Either NONE, or the religion needed in a city to build this unit | |||
|- | |||
! PrereqCorporation | |||
| Either NONE, or the corporation needed in a city to build this unit | |||
|- | |||
! PrereqBuilding | |||
| Either NONE, or the building needed in a city to build this unit | |||
|- | |||
! PrereqTech | |||
| Either NONE, or the technology that you need to build this unit | |||
|- | |||
! TechTypes | |||
| Used as a list tag to enclose PrereqTech tags. | |||
|- | |||
! BonusType | |||
| The resource needed to build this unit. | |||
|- | |||
! PrereqBonuses | |||
| Used as a list tag to enclose BonusType tags. | |||
|- | |||
! ProductionTraits | |||
| The leader traits which affect production of this unit, along with the value. | |||
|- | |||
! Flavors | |||
| '''The 'flavours' of the unit - not sure what they actually do''' | |||
|- | |||
|} | |||
== Integer Tags == | == Integer Tags == |
Revision as of 11:28, 10 May 2009
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.
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
Tag | Usage |
---|---|
UnitInfos | This begins and ends the file. Everything must go in between these two, or it will not work. |
UnitInfo | Each different unit's data is enclosed in a seperate tag like this. |
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. |
Type | The name of the unit; which must be unique |
UniqueNames | Only ever a closing tag. Just put it in, OK? |
Special | Should be NONE unless it comes under a heading in CIV4SpecialUnitInfos.xml; in which case write that. |
Capture | Either NONE, or the unit which the unit turns into when captured |
Combat | 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. |
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 |
Text Tags
Description | Either text or a key from the text files. The name displayed for the unit. |
---|---|
Civilopedia | As above for the Civiliopedia entry |
Strategy | 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
All of these can either be 1 (on) or 0 (off)
Tag | Usage |
---|---|
bAnimal | The unit is an animal; the Barbarian State controls it, it can spring from anywhere and it cannot enter cultural borders. |
bFood | A city does not generate food while building this unit |
bNoBadGoodies | When this unit is entering a Tribal Village, the villagers will never be hostile |
bOnlyDefensive | This unit cannot attack other units |
bNoCapture | This unit cannot capture cities |
bQuickCombat | ALways 0; not sure what it actually does |
bRivalTerritory | Can explore rival territory |
bMilitaryHappiness | Counts as a Military Unit in the eyes of the rabble |
bMilitarySupport | Costs money to maintain as part of your military, affected by Pacifism and the like. |
bMilitaryProduction | Counts as a military unit for production bonuses/penalties |
bPillage | Can pillage enemy tiles |
bSpy | Is a spy |
bSabotage | Should only be 1 in Vanilla or Warlords; can Sabotage Production |
bDestroy | Should only be 1 in Vanilla or Warlords; can Destroy Improvement |
bStealPlans | Should only be 1 in Vanilla or Warlords; can Steal Plans |
bInvestigate | Should only be 1 in Vanilla or Warlords; can Investigate City |
bCounterSpy | Should only be 1 in Vanilla or Warlords; can Perform Counterespionage |
bFound | Can found a city |
bGoldenAge | Counts as a Great Person to start a Golden Age |
bInvisible | Is invisible to all units |
bFirstStrikeImmune | Is immune to all First Strikes |
bNoDefensiveBonus | Does not receive defensive bonuses |
bIgnoreBuildingDefense | Ignores defensive bonuses from enemy buildings, like Walls and Castles |
bCanMoveImpassible | If the unit is a Submarine, it can go under Ice. |
bCanMoveAllTerrain | Can move across all terrain |
bFlatMovementCost | Pays a flat movement cost to enter all terrain |
bIgnoreTerrainCost | Ignores movement penalties from terrain |
bNukeInnume | Takes no damage from enemy nukes |
bPrereqBonuses | Needs the mentioned resources to be built (can be NONE) |
bPrereqReligion | Needs the mentioned religion to be built (can be NONE) |
bMechanized | Not sure what this does - used for all land units in a vehicle |
bSuicide | Kills itself upon attacking, like a Kamikaze in the Defence mod |
bHiddenNationality | Bears no marking of nationality |
bAlwaysHostile | Can attack enemy units without declaring war, and can be attacked without triggering a war. All nations treat it as an enemy unit. |
All List tags consist of an opening/closing tag, then each entry is in another tag which is the same as the main tag take away the s.
List Tags
Tag | Usage |
---|---|
UnitClassUpgrades | The Classes of unit to which this unit upgrades |
UnitClassTargets | Not sure what this one does |
UnitCombatTargets | Does whatever UnitClassTargets does, but is directed at a particular combat |
UnitClassDefenders | Not sure what this one does |
UnitCombatDefenders | Does whatever UnitClassDefenders does, but is directed at a particular combat |
FlankingStrikes | All unit classes against which the unit gets a Flank Attack |
UnitAIs | Inside here go the methods which the AI uses to command this unit. It dictates the roles which the unit is good for. |
NotUnitAIs | As UnitAIs, but for the tasks which the AI will never consider the unit for. |
Builds | For all the things that the unit can build on tiles; but not wonders that it can build in cities. |
ReligionSpreads | Put the religions which the unit can spread here, if it is a missionary. |
CorporationSpreads | Put the Corporations which the unit can spread here, if it is a CEO. |
GreatPeoples | If the unit can settle in a city, put the type of specialist it becomes here. |
Buildings | The buildings which the unit can construct in a city. |
ForceBuildings | Not sure what this does |
Prerequisite Tags
Tag | Usage |
---|---|
HolyCity | If not NONE, then it is the Holy City needed to build the unit |
ReligionType | For units, always NONE. |
StateReligion | If not NONE, the State Religion needed to build this unit |
PrereqReligion | Either NONE, or the religion needed in a city to build this unit |
PrereqCorporation | Either NONE, or the corporation needed in a city to build this unit |
PrereqBuilding | Either NONE, or the building needed in a city to build this unit |
PrereqTech | Either NONE, or the technology that you need to build this unit |
TechTypes | Used as a list tag to enclose PrereqTech tags. |
BonusType | The resource needed to build this unit. |
PrereqBonuses | Used as a list tag to enclose BonusType tags. |
ProductionTraits | The leader traits which affect production of this unit, along with the value. |
Flavors | The 'flavours' of the unit - not sure what they actually do |
Integer Tags
Miscellaneous Tags
Art Tags
Integer Tags
<iAIWeight></iAIWeight> The preference given by the AI to this unit
<iCost></iCost> The cost in hammers of the unit
<iHurryCostModifier></iHurryCostModifier> The number by which you multiply the cost to get the hurry cost
<iAdvancedStartCost></iAdvancedStartCost> The cost on Advanced Start
<iAdvancedStartCostIncrease></iAdvancedStartCostIncrease> The increase in cost on Advanced Start
<iMinAreaSize></iMinAreaSize> Don't know what this does
<iMoves></iMoves>The number of moves a unit has
<bNoRevealMap></bNoRevealMap> If 1, the unit does not reveal the map
<iAirRange></iAirRange> For Air Units, the range
<iAirUnitCap></iAirUnitCap> Should be 0
<iDropRange></iDropRange> The range which the unit can parachute-jump
<iNukeRange></iNukeRange> The range at which the 'nuke' can be launched (0 for non-nukes)
<iWorkRate></iWorkRate> The rate at which the unit improves tiles
<iBaseDiscover></iBaseDiscover> The rate at which a unit discovers tiles
<iDiscoverMultiplier></iDiscoverMultiplier> Affects the rate at which the unit discovers tiles
<iBaseHurry></iBaseHurry> No idea
<iHurryMultiplier></iHurryMultiplier> Like <iDiscoverMultiplier>
<iBaseTrade></iBaseTrade> No idea
<iTradeMultiplier></iTradeMultiplier> See above
<iGreatWorkCulture></iGreatWorkCulture> The amount of culture that the unit can generate from a Great Work
<iEspionagePoints></iEspionagePoints> Used for spies
<TerrainImpassables></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></TerrainNative>
<FeatureNatives/>
<TerrainAttacks/>
<TerrainDefenses/>
<FeatureAttacks/>
<FeatureDefenses/>
<UnitClassAttackMods/>
<UnitClassDefenseMods/>
<UnitCombatMods/>
<UnitCombatCollateralImmunes/>
<DomainMods/>
<BonusProductionModifiers/>
<iBombRate>0</iBombRate>
<iBombardRate>0</iBombardRate>
<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo></iCargo> The number of units that it can carry
Misc Tags
<iConscription></iConscription> If 1, the unit can be Drafted
<iCultureGarrison></iCultureGarrison> Don't know what this does
<iExtraCost></iExtraCost>
<iAsset>0</iAsset>
<iPower>0</iPower>
Art Tags
<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>