Civ4UnitInfos: Difference between revisions
Ginger Ale (talk | contribs) No edit summary |
Ginger Ale (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
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. | ||
== Text Tags == | == Text Tags == |
Revision as of 15:49, 9 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.
Text 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 | |
UniqueNames | |
Special | |
Capture | |
Combat | |
Domain | |
DefaultUnitAI | |
Invisible | |
SeeInvisible | |
Description | |
Civilopedia | |
Strategy | |
Advisor |
Boolean Tags
Tag | Usage |
---|---|
bAnimal | |
bFood | |
bNoBadGoodies | |
bOnlyDefensive | |
bNoCapture | |
bQuickCombat | |
bRivalTerritory | |
bMilitaryHappiness | |
bMilitarySupport | |
bMilitaryProduction | |
bPillage | |
bSpy | |
bSabotage | |
bDestroy | |
bStealPlans | |
bInvestigate | |
bCounterSpy | |
bFound | |
bGoldenAge | |
bInvisible | |
bFirstStrikeImmune | |
bNoDefensiveBonus | |
bIgnoreBuildingDefense | |
bCanMoveImpassible | |
bCanMoveAllTerrain | |
bFlatMovementCost | |
bIgnoreTerrainCost | |
bNukeInnume | |
bPrereqBonuses | |
bPrereqReligion | |
bMechanized | |
bSuicide | |
bHiddenNationality | |
bAlwaysHostile |
List Tags
Prerequisite Tags
Integer Tags
Miscellaneous Tags
Art Tags
<UnitInfos></UnitInfos> This begins and ends the file. Everything must go in between these two, or it will not work.
<UnitInfo></UnitInfo> Each different unit's data is enclosed in a seperate tag like this.
<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.
<Type></Type> The unit's in-game name, which must be unique.
<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.
<Special></Special> Should be NONE unless the unit is in one of your special categories in CIV4SpecialUnitInfos.xml; in which case put that in.
<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
<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
<Domain></Domain> DOMAIN_, then AIR, SEA or LAND. Shows whether the unit is an air, sea or land unit.
<DefaultUnitAI></DefaultUnitAI> How the AI uses the unit, by default.
<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)
<SeeInvisible></SeeInvisible> NONE, or else the sort of invisible unit (see above) that it can see.
<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.
<Civilopedia></Civilopedia> As above; the entry in the Civilopedia for the unit.
<Strategy></Strategy> The Sid's Tips, as above. Also displayed at the top of the Civilopedia entry
<Advisor></Advisor> The advisor that will chip in (normally ADVISOR_MILITARY) when building this unit is a good idea.
Boolean Tags
<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.
<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.
<bNoBadGoodies></bNoBadGoodies> Is set to 1 for Scouts and Explorers; means that Tribal Villages will never attack this unit.
<bOnlyDefensive></bOnlyDefensive> If set to 1, the unit cannot attack other units.
<bNoCapture></bNoCapture> If set to 1, the unit cannot take cities, even when there are no units in them.
<bQuickCombat></bQuickCombat> Always set to 0; not sure what it does.
<bRivalTerritory></bRivalTerritory> If set to 1, the unit can enter enemy territory without declaring war.
<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
<bMilitarySupport></bMilitarySupport> If set to 1, counts as a military unit for the penalty posed by Pacifism and other bonusus/penalties like that.
<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.
<bPillage></bPillage> If set to 1, the unit can pillage enemy tiles
<bSpy></bSpy> If set to 1, the unit is a spy
<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.
<bDestroy></bDestroy> As above, but for Destroy Improvement
<bStealPlans></bStealPlans> As above, for Steal Plans
<bInvestigate></bInvestigate> As above, for Investigate City
<bCounterSpy></bCounterSpy> As above, for Perform Counterespionage.
<bFound></bFound> If set to 1, the unit can found a new city.
<bGoldenAge></bGoldenAge> If set to 1, the unit counts as a Great Person to start a Golden Age.
<bInvisible></bInvisible> If set to 1, is invisible to all units.
<bFirstStrikeImmune></bFirstStrikeImmune> If set to 1, the unit is immune to all first strikes.
<bNoDefensiveBonus></bNoDefensiveBonus> If set to 1, the unit does not recieve defensive bonuses
<bIgnoreBuildingDefense></bIgnoreBuildingDefense> If set to 1, the unit ignores defensive bonuses from enemy walls and castles, like a Gunpowder unit.
<bCanMoveImpassable></bCanMoveImpassable> If set to 1, the unit can move under ice. Used for Submarines.
<bCanMoveAllTerrain></bCanMoveAllTerrain> If set to 1, the unit can move over all terrain.
<bFlatMovementCost></bFlatMovementCost> If set to 1, the unit pays this fixed price to enter all terrain.
<bIgnoreTerrainCost></bIgnoreTerrainCost> If set to 1, the unit ignores the cost of terrain to move into.
<bNukeImmune></bNukeImmune> If set to 1, the unit is immune to damage from nukes.
<bPrereqBonuses></bPrereqBonuses> Set to 0 for all unit except Work Boats. Not sure what it does.
<bPrereqReligion></bPrereqReligion> If set to 1, the unit requires the State Religion to be present in the city.
<bMechanized></bMechanized> Not sure what this does. Can be 1 or 0.
<bSuicide></bSuicide> If set to 1, the unit dies when it makes an attack
<bHiddenNationality></bHiddenNationality> If set to 1, the unit bears no marking of nationality.
<bAlwaysHostile></bAlwaysHostile> If set to 1, can attack the enemy without declaring war.
List Tags
<UnitClassUpgrades></UnitClassUpgrades> Inside here you put all of the unit classes which the unit upgrades to.
<UnitClassUpgrade></UnitClassUpgrade> Enclose in this tag everything which the unit upgrades to.
<UnitClassTargets></UnitClassTargets> Not sure what this does.
<UnitCombatTargets></UnitCombatTargets> Same as above
<UnitClassDefenders></UnitClassDefenders> Same as above
<UnitCombatDefenders></UnitCombatDefenders> Same as above
<FlankingStrikes></FlankingStrikes> All Flank Attacks which the unit gets should go under here.
<FlankingStrike></FlankingStrike> Put the unit and number of Flanking Strikes here.
<UnitAIs></UnitAIs> Inside here go the methods which the AI uses to command this unit.
<UnitAI></UnitAI> Put each AI in here.
<NotUnitAIs></NotUnitAIs> As <UnitAIs>, but for the tasks which the AI will never consider the unit for.
<NotUnitAI></NotUnitAI> As above for <UnitAI>
<Builds></Builds> For all the things that the unit can build on tiles
<Build></Build> Each thing that the unit can build goes in one of these.
<ReligionSpreads></ReligionSpreads> Put the religions which the unit can spread here.
<ReligionSpread></ReligionSpread> Each religion goes in here
<CorporationSpreads></CorporationSpreads> As above for <ReligionSpreads>
<CorporationSpread></CorporationSpread> As above for <ReligionSpread>
<GreatPeoples></GreatPeoples> The types of Super Specialist that this person can become
<GreatPeopleType></GreatPeopleType> Each type of Super Specialist goes in here.
<Buildings></Buildings> All of the things that the unit can construct in a city go here.
<Building></Building> Each building goes in one of these
<ForceBuildings></ForceBuildings> Don't know what this does
Preresquisite Tags
<HolyCity></HolyCity> If not NONE, then it is the Holy City needed to build the unit.
<ReligionType></ReligionType> For units, always NONE.
<StateReligion></StateReligion> If not NONE, the State Religion needed to build this unit
<PrereqReligion></PrereqReligion> As above for Religion
<PrereqCorporation></PrereqCorporation> As above for Corporation
<PrereqBuilding></PrereqBuilding> As above for building
<PrereqTech></PrereqTech> As above for technology
<TechTypes></TechTypes> Encloses the above
<BonusType></BonusType> If not NONE, the resource needed to build the unit
<PrereqBonuses></PrereqBonuses> Don't know what this does
<ProductionTraits></ProductionTraits> The leader traits which affect production of this unit
<Flavors><Flavors> The 'flavors' of a unit - not sure what they do
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>