In 0 A.D., entities (units and buildings and other world objects) consist of a collection of components, each of which determines part of the entity's behaviour. Entity template XML files specify the list of components that are loaded for each entity type, plus initialisation data for the components.
This page lists the components that can be added to entities and the XML syntax for their initialisation data.
Available components:
<element name="AIProxy"> <interleave> <empty/> </interleave> </element>
List
Classes of entities which are affected by this alert raiser.
Value type: text.
datatype
Required value: tokens
RaiseAlertRange
Value type: integer.
EndOfAlertRange
Value type: integer.
SearchRange
Value type: integer.
<element name="AlertRaiser"> <interleave> <element name="List"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> <element name="RaiseAlertRange"> <data type="integer"/> </element> <element name="EndOfAlertRange"> <data type="integer"/> </element> <element name="SearchRange"> <data type="integer"/> </element> </interleave> </element>
Controls the damage resistance of the unit.
<Armour> <Hack>10.0</Hack> <Pierce>0.0</Pierce> <Crush>5.0</Crush> </Armour>
Hack
Hack damage protection.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Pierce
Pierce damage protection.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Crush
Crush damage protection.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Foundation
Optional.
Armour given to building foundations.
Hack
Hack damage protection.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Pierce
Pierce damage protection.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Crush
Crush damage protection.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="Armour"> <interleave> <element name="Hack"> <ref name="nonNegativeDecimal"/> </element> <element name="Pierce"> <ref name="nonNegativeDecimal"/> </element> <element name="Crush"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="Foundation"> <interleave> <element name="Hack"> <ref name="nonNegativeDecimal"/> </element> <element name="Pierce"> <ref name="nonNegativeDecimal"/> </element> <element name="Crush"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element> </optional> </interleave> </element>
Controls the attack abilities and strengths of the unit.
<Attack> <Melee> <Hack>10.0</Hack> <Pierce>0.0</Pierce> <Crush>5.0</Crush> <MaxRange>4.0</MaxRange> <RepeatTime>1000</RepeatTime> <Bonuses> <Bonus1> <Civ>pers</Civ> <Classes>Infantry</Classes> <Multiplier>1.5</Multiplier> </Bonus1> <BonusCavMelee> <Classes>Cavalry Melee</Classes> <Multiplier>1.5</Multiplier> </BonusCavMelee> </Bonuses> <RestrictedClasses datatype="tokens">Champion</RestrictedClasses> <PreferredClasses datatype="tokens">Cavalry Infantry</PreferredClasses> </Melee> <Ranged> <Hack>0.0</Hack> <Pierce>10.0</Pierce> <Crush>0.0</Crush> <MaxRange>44.0</MaxRange> <MinRange>20.0</MinRange> <ElevationBonus>15.0</ElevationBonus> <PrepareTime>800</PrepareTime> <RepeatTime>1600</RepeatTime> <ProjectileSpeed>50.0</ProjectileSpeed> <Spread>2.5</Spread> <Delay>1000</Delay> <Bonuses> <Bonus1> <Classes>Cavalry</Classes> <Multiplier>2</Multiplier> </Bonus1> </Bonuses> <Projectile> <ActorName>props/units/weapons/rock_flaming.xml</ActorName> <ImpactActorName>props/units/weapons/rock_explosion.xml</ImpactActorName> <ImpactAnimationLifetime>0.1</ImpactAnimationLifetime> </Projectile> <RestrictedClasses datatype="tokens">Champion</RestrictedClasses> <Splash> <Shape>Circular</Shape> <Range>20</Range> <FriendlyFire>false</FriendlyFire> <Hack>0.0</Hack> <Pierce>10.0</Pierce> <Crush>0.0</Crush> </Splash> </Ranged> <Slaughter> <Hack>1000.0</Hack> <Pierce>0.0</Pierce> <Crush>0.0</Crush> <MaxRange>4.0</MaxRange> </Slaughter> </Attack>
Melee
Optional.
Hack
Hack damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Pierce
Pierce damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Crush
Crush damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
MaxRange
Maximum attack range (in metres).
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
PrepareTime
Time from the start of the attack command until the attack actually occurs (in milliseconds). This value relative to RepeatTime should closely match the "event" point in the actor's attack animation.
Value type: non-negative integer (e.g. 0
or 5
).
RepeatTime
Time between attacks (in milliseconds). The attack animation will be stretched to match this time.
Value type: positive integer (e.g. 1
or 5
).
Bonuses
Optional.
Civ
Optional.
If an entity has this civ then the bonus is applied.
Value type: text.
Classes
If an entity has all these classes then the bonus is applied.
Value type: text.
Multiplier
The attackers attack strength is multiplied by this.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
PreferredClasses
Optional.
Space delimited list of classes preferred for attacking. If an entity has any of theses classes, it is preferred. The classes are in decending order of preference.
Value type: text.
datatype
Required value: tokens
RestrictedClasses
Optional.
Space delimited list of classes that cannot be attacked by this entity. If target entity has any of these classes, it cannot be attacked.
Value type: text.
datatype
Required value: tokens
Ranged
Optional.
Hack
Hack damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Pierce
Pierce damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Crush
Crush damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
MaxRange
Maximum attack range (in metres).
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
MinRange
Minimum attack range (in metres).
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
ElevationBonus
Optional.
give an elevation advantage (in meters).
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
RangeOverlay
Optional.
LineTexture
Value type: text.
LineTextureMask
Value type: text.
LineThickness
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
PrepareTime
Time from the start of the attack command until the attack actually occurs (in milliseconds). This value relative to RepeatTime should closely match the "event" point in the actor's attack animation.
Value type: non-negative integer (e.g. 0
or 5
).
RepeatTime
Time between attacks (in milliseconds). The attack animation will be stretched to match this time.
Value type: positive integer (e.g. 1
or 5
).
ProjectileSpeed
Speed of projectiles (in metres per second).
Value type: positive decimal (e.g. 1.0
or 2.5
).
Gravity
The gravity affecting the projectile. This affects the shape of the flight curve..
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Spread
Standard deviation of the bivariate normal distribution of hits at 100 meters. A disk at 100 meters from the attacker with this radius (2x this radius, 3x this radius) is expected to include the landing points of 39.3% (86.5%, 98.9%) of the rounds..
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Delay
Delay of the damage in milliseconds.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Bonuses
Optional.
Civ
Optional.
If an entity has this civ then the bonus is applied.
Value type: text.
Classes
If an entity has all these classes then the bonus is applied.
Value type: text.
Multiplier
The attackers attack strength is multiplied by this.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
PreferredClasses
Optional.
Space delimited list of classes preferred for attacking. If an entity has any of theses classes, it is preferred. The classes are in decending order of preference.
Value type: text.
datatype
Required value: tokens
RestrictedClasses
Optional.
Space delimited list of classes that cannot be attacked by this entity. If target entity has any of these classes, it cannot be attacked.
Value type: text.
datatype
Required value: tokens
Projectile
Optional.
ActorName
actor of the projectile animation.
Value type: text.
ImpactActorName
actor of the projectile impact animation.
Value type: text.
ImpactAnimationLifetime
length of the projectile impact animation.
Value type: positive decimal (e.g. 1.0
or 2.5
).
Splash
Optional.
Shape
Shape of the splash damage, can be circular or linear.
Value type: text.
Range
Size of the area affected by the splash.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
FriendlyFire
Whether the splash damage can hurt non enemy units.
Value type: boolean (true
or false
).
Hack
Hack damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Pierce
Pierce damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Crush
Crush damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Bonuses
Optional.
Civ
Optional.
If an entity has this civ then the bonus is applied.
Value type: text.
Classes
If an entity has all these classes then the bonus is applied.
Value type: text.
Multiplier
The attackers attack strength is multiplied by this.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Capture
Optional.
Value
Capture points value.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
MaxRange
Maximum attack range (in meters).
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
RepeatTime
Time between attacks (in milliseconds). The attack animation will be stretched to match this time.
Value type: positive integer (e.g. 1
or 5
).
Bonuses
Optional.
Civ
Optional.
If an entity has this civ then the bonus is applied.
Value type: text.
Classes
If an entity has all these classes then the bonus is applied.
Value type: text.
Multiplier
The attackers attack strength is multiplied by this.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
PreferredClasses
Optional.
Space delimited list of classes preferred for attacking. If an entity has any of theses classes, it is preferred. The classes are in decending order of preference.
Value type: text.
datatype
Required value: tokens
RestrictedClasses
Optional.
Space delimited list of classes that cannot be attacked by this entity. If target entity has any of these classes, it cannot be attacked.
Value type: text.
datatype
Required value: tokens
Slaughter
Optional.
A special attack to kill domestic animals.
Hack
Hack damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Pierce
Pierce damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Crush
Crush damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
MaxRange
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Bonuses
Optional.
Civ
Optional.
If an entity has this civ then the bonus is applied.
Value type: text.
Classes
If an entity has all these classes then the bonus is applied.
Value type: text.
Multiplier
The attackers attack strength is multiplied by this.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
PreferredClasses
Optional.
Space delimited list of classes preferred for attacking. If an entity has any of theses classes, it is preferred. The classes are in decending order of preference.
Value type: text.
datatype
Required value: tokens
RestrictedClasses
Optional.
Space delimited list of classes that cannot be attacked by this entity. If target entity has any of these classes, it cannot be attacked.
Value type: text.
datatype
Required value: tokens
<element name="Attack"> <interleave> <optional> <element name="Melee"> <interleave> <element name="Hack"> <ref name="nonNegativeDecimal"/> </element> <element name="Pierce"> <ref name="nonNegativeDecimal"/> </element> <element name="Crush"> <ref name="nonNegativeDecimal"/> </element> <element name="MaxRange"> <ref name="nonNegativeDecimal"/> </element> <element name="PrepareTime"> <data type="nonNegativeInteger"/> </element> <element name="RepeatTime"> <data type="positiveInteger"/> </element> <optional> <element name="Bonuses"> <zeroOrMore> <element> <anyName/> <interleave> <optional> <element name="Civ"> <text/> </element> </optional> <element name="Classes"> <text/> </element> <element name="Multiplier"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element> </zeroOrMore> </element> </optional> <optional> <element name="PreferredClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <optional> <element name="RestrictedClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> </interleave> </element> </optional> <optional> <element name="Ranged"> <interleave> <element name="Hack"> <ref name="nonNegativeDecimal"/> </element> <element name="Pierce"> <ref name="nonNegativeDecimal"/> </element> <element name="Crush"> <ref name="nonNegativeDecimal"/> </element> <element name="MaxRange"> <ref name="nonNegativeDecimal"/> </element> <element name="MinRange"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="ElevationBonus"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="RangeOverlay"> <interleave> <element name="LineTexture"> <text/> </element> <element name="LineTextureMask"> <text/> </element> <element name="LineThickness"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element> </optional> <element name="PrepareTime"> <data type="nonNegativeInteger"/> </element> <element name="RepeatTime"> <data type="positiveInteger"/> </element> <element name="ProjectileSpeed"> <ref name="positiveDecimal"/> </element> <element name="Gravity"> <ref name="nonNegativeDecimal"/> </element> <element name="Spread"> <ref name="nonNegativeDecimal"/> </element> <element name="Delay"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="Bonuses"> <zeroOrMore> <element> <anyName/> <interleave> <optional> <element name="Civ"> <text/> </element> </optional> <element name="Classes"> <text/> </element> <element name="Multiplier"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element> </zeroOrMore> </element> </optional> <optional> <element name="PreferredClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <optional> <element name="RestrictedClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <optional> <element name="Projectile"> <interleave> <oneOrMore> <choice> <element name="ActorName"> <text/> </element> <interleave> <element name="ImpactActorName"> <text/> </element> <element name="ImpactAnimationLifetime"> <ref name="positiveDecimal"/> </element> </interleave> </choice> </oneOrMore> </interleave> </element> </optional> <optional> <element name="Splash"> <interleave> <element name="Shape"> <text/> </element> <element name="Range"> <ref name="nonNegativeDecimal"/> </element> <element name="FriendlyFire"> <data type="boolean"/> </element> <element name="Hack"> <ref name="nonNegativeDecimal"/> </element> <element name="Pierce"> <ref name="nonNegativeDecimal"/> </element> <element name="Crush"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="Bonuses"> <zeroOrMore> <element> <anyName/> <interleave> <optional> <element name="Civ"> <text/> </element> </optional> <element name="Classes"> <text/> </element> <element name="Multiplier"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element> </zeroOrMore> </element> </optional> </interleave> </element> </optional> </interleave> </element> </optional> <optional> <element name="Capture"> <interleave> <element name="Value"> <ref name="nonNegativeDecimal"/> </element> <element name="MaxRange"> <ref name="nonNegativeDecimal"/> </element> <element name="RepeatTime"> <data type="positiveInteger"/> </element> <optional> <element name="Bonuses"> <zeroOrMore> <element> <anyName/> <interleave> <optional> <element name="Civ"> <text/> </element> </optional> <element name="Classes"> <text/> </element> <element name="Multiplier"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element> </zeroOrMore> </element> </optional> <optional> <element name="PreferredClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <optional> <element name="RestrictedClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> </interleave> </element> </optional> <optional> <element name="Slaughter"> <interleave> <element name="Hack"> <ref name="nonNegativeDecimal"/> </element> <element name="Pierce"> <ref name="nonNegativeDecimal"/> </element> <element name="Crush"> <ref name="nonNegativeDecimal"/> </element> <element name="MaxRange"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="Bonuses"> <zeroOrMore> <element> <anyName/> <interleave> <optional> <element name="Civ"> <text/> </element> </optional> <element name="Classes"> <text/> </element> <element name="Multiplier"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element> </zeroOrMore> </element> </optional> <optional> <element name="PreferredClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <optional> <element name="RestrictedClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> </interleave> </element> </optional> </interleave> </element>
Detects incoming attacks.
<AttackDetection/>
SuppressionTransferRange
Any attacks within this range in meters will replace the previous attack suppression.
Value type: positive decimal (e.g. 1.0
or 2.5
).
SuppressionRange
Other attacks within this range in meters will not be registered.
Value type: positive decimal (e.g. 1.0
or 2.5
).
SuppressionTime
Other attacks within this time in milliseconds will not be registered.
Value type: positive integer (e.g. 1
or 5
).
<element name="AttackDetection"> <interleave> <element name="SuppressionTransferRange"> <ref name="positiveDecimal"/> </element> <element name="SuppressionRange"> <ref name="positiveDecimal"/> </element> <element name="SuppressionTime"> <data type="positiveInteger"/> </element> </interleave> </element>
datatype
Required value: tokens
<element name="Auras"> <interleave> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </interleave> </element>
Detects the occurence of battles.
<BattleDetection/>
TimerInterval
Duration of one timer period. Interval over which damage should be recorded in milliseconds.
Value type: positive integer (e.g. 1
or 5
).
RecordLength
Record length. Number of timer cycles over which damage rate should be calculated.
Value type: positive integer (e.g. 1
or 5
).
DamageRateThreshold
Damage rate at which alertness is increased.
Value type: positive decimal (e.g. 1.0
or 2.5
).
AlertnessBattleThreshold
Alertness at which the player is considered in battle.
Value type: positive decimal (e.g. 1.0
or 2.5
).
AlertnessPeaceThreshold
Alertness at which the player is considered at peace.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
AlertnessMax
Maximum alertness level.
Value type: positive decimal (e.g. 1.0
or 2.5
).
<element name="BattleDetection"> <interleave> <element name="TimerInterval"> <data type="positiveInteger"/> </element> <element name="RecordLength"> <data type="positiveInteger"/> </element> <element name="DamageRateThreshold"> <ref name="positiveDecimal"/> </element> <element name="AlertnessBattleThreshold"> <ref name="positiveDecimal"/> </element> <element name="AlertnessPeaceThreshold"> <ref name="nonNegativeDecimal"/> </element> <element name="AlertnessMax"> <ref name="positiveDecimal"/> </element> </interleave> </element>
Specifies building placement restrictions as they relate to terrain, territories, and distance.
<BuildRestrictions> <BuildRestrictions> <PlacementType>land</PlacementType> <Territory>own</Territory> <Category>Special</Category> <Distance> <FromClass>CivilCentre</FromClass> <MaxDistance>40</MaxDistance> </Distance> </BuildRestrictions> </BuildRestrictions>
PlacementType
Specifies the terrain type restriction for this building..
Value is one of:
land
shore
land-shore
Territory
Specifies territory type restrictions for this building..
Category
Specifies the category of this building, for satisfying special constraints. Choices include: Apadana, ArmyCamp, Barracks, CivilCentre, Colony, Council, DefenseTower, Dock, Embassy, Farmstead, Fence, Field, Fortress, Hall, House, Kennel, Library, Market, Monument, Outpost, Pillar, Resource, Special, Stoa, Storehouse, Temple, Theater, UniqueBuilding, Wall, Wonder.
Value type: text.
Distance
Optional.
Specifies distance restrictions on this building, relative to buildings from the given category..
FromClass
Value type: text.
MinDistance
Optional.
Value type: positive integer (e.g. 1
or 5
).
MaxDistance
Optional.
Value type: positive integer (e.g. 1
or 5
).
<element name="BuildRestrictions"> <interleave> <element name="PlacementType"> <choice> <value>land</value> <value>shore</value> <value>land-shore</value> </choice> </element> <element name="Territory"> <list> <oneOrMore> <choice> <value>own</value> <value>ally</value> <value>neutral</value> <value>enemy</value> </choice> </oneOrMore> </list> </element> <element name="Category"> <text/> </element> <optional> <element name="Distance"> <interleave> <element name="FromClass"> <text/> </element> <optional> <element name="MinDistance"> <data type="positiveInteger"/> </element> </optional> <optional> <element name="MaxDistance"> <data type="positiveInteger"/> </element> </optional> </interleave> </element> </optional> </interleave> </element>
Allows the unit to construct and repair buildings.
<Builder> <Rate>1.0</Rate> <Entities datatype="tokens"> structures/{civ}_barracks structures/{native}_civil_centre structures/pers_apadana </Entities> </Builder>
Rate
Construction speed multiplier (1.0 is normal speed, higher values are faster)..
Value type: positive decimal (e.g. 1.0
or 2.5
).
Entities
Space-separated list of entity template names that this unit can build. The special string "{civ}" will be automatically replaced by the civ code of the unit's owner, while the string "{native}" will be automatically replaced by the unit's civ code. This element can also be empty, in which case no new foundations may be placed by the unit, but they can still repair existing buildings..
Value type: text.
datatype
Required value: tokens
<element name="Builder"> <interleave> <element name="Rate"> <ref name="positiveDecimal"/> </element> <element name="Entities"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </interleave> </element>
DefaultArrowCount
Value type: non-negative integer (e.g. 0
or 5
).
MaxArrowCount
Optional.
Limit the number of arrows to a certain amount.
Value type: non-negative integer (e.g. 0
or 5
).
GarrisonArrowMultiplier
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
GarrisonArrowClasses
Add extra arrows for this class list.
Value type: text.
<element name="BuildingAI"> <interleave> <element name="DefaultArrowCount"> <data type="nonNegativeInteger"/> </element> <optional> <element name="MaxArrowCount"> <data type="nonNegativeInteger"/> </element> </optional> <element name="GarrisonArrowMultiplier"> <ref name="nonNegativeDecimal"/> </element> <element name="GarrisonArrowClasses"> <text/> </element> </interleave> </element>
CapturePoints
Maximum capture points.
Value type: positive decimal (e.g. 1.0
or 2.5
).
RegenRate
Number of capture are regenerated per second in favour of the owner.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
GarrisonRegenRate
Number of capture are regenerated per second and per garrisoned unit in favour of the owner.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="Capturable"> <interleave> <element name="CapturePoints"> <ref name="positiveDecimal"/> </element> <element name="RegenRate"> <ref name="nonNegativeDecimal"/> </element> <element name="GarrisonRegenRate"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element>
Specifies the construction/training costs of this entity.
<Cost> <Population>1</Population> <PopulationBonus>15</PopulationBonus> <BuildTime>20.0</BuildTime> <Resources> <food>50</food> <wood>0</wood> <stone>0</stone> <metal>25</metal> </Resources> </Cost>
Population
Population cost.
Value type: non-negative integer (e.g. 0
or 5
).
PopulationBonus
Population cap increase while this entity exists.
Value type: non-negative integer (e.g. 0
or 5
).
BuildTime
Time taken to construct/train this entity (in seconds).
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Resources
Resource costs to construct/train this entity.
food
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
wood
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
stone
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
metal
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
<element name="Cost"> <interleave> <element name="Population"> <data type="nonNegativeInteger"/> </element> <element name="PopulationBonus"> <data type="nonNegativeInteger"/> </element> <element name="BuildTime"> <ref name="nonNegativeDecimal"/> </element> <element name="Resources"> <interleave> <optional> <element name="food"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="wood"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="stone"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="metal"> <data type="nonNegativeInteger"/> </element> </optional> </interleave> </element> </interleave> </element>
When a unit or building is destroyed, it inflicts damage to nearby units.
<DeathDamage> <Shape>Circular</Shape> <Range>20</Range> <FriendlyFire>false</FriendlyFire> <Hack>0.0</Hack> <Pierce>10.0</Pierce> <Crush>50.0</Crush> </DeathDamage>
Shape
Shape of the splash damage, can be circular.
Value type: text.
Range
Size of the area affected by the splash.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
FriendlyFire
Whether the splash damage can hurt non enemy units.
Value type: boolean (true
or false
).
Hack
Hack damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Pierce
Pierce damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Crush
Crush damage strength.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Bonuses
Optional.
Civ
Optional.
If an entity has this civ then the bonus is applied.
Value type: text.
Classes
If an entity has all these classes then the bonus is applied.
Value type: text.
Multiplier
The attackers attack strength is multiplied by this.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="DeathDamage"> <interleave> <element name="Shape"> <text/> </element> <element name="Range"> <ref name="nonNegativeDecimal"/> </element> <element name="FriendlyFire"> <data type="boolean"/> </element> <element name="Hack"> <ref name="nonNegativeDecimal"/> </element> <element name="Pierce"> <ref name="nonNegativeDecimal"/> </element> <element name="Crush"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="Bonuses"> <zeroOrMore> <element> <anyName/> <interleave> <optional> <element name="Civ"> <text/> </element> </optional> <element name="Classes"> <text/> </element> <element name="Multiplier"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element> </zeroOrMore> </element> </optional> </interleave> </element>
Active
If false, the entity will not do any decaying.
Value type: boolean (true
or false
).
SinkingAnim
If true, the entity will decay in a ship-like manner.
Value type: boolean (true
or false
).
DelayTime
Time to wait before starting to sink, in seconds.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
SinkRate
Initial rate of sinking, in metres per second.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
SinkAccel
Acceleration rate of sinking, in metres per second per second.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="Decay"> <interleave> <element name="Active"> <data type="boolean"/> </element> <element name="SinkingAnim"> <data type="boolean"/> </element> <element name="DelayTime"> <ref name="nonNegativeDecimal"/> </element> <element name="SinkRate"> <ref name="nonNegativeDecimal"/> </element> <element name="SinkAccel"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element>
Specifies per category limits on number of entities (buildings or units) that can be created for each player
<EntityLimits> <Limits> <DefenseTower>25</DefenseTower> <Fortress>10</Fortress> <Wonder>1</Wonder> <Hero>1</Hero> <Apadana>1</Apadana> <Monument>5</Monument> </Limits> <LimitChangers> <Monument> <CivilCentre>2</CivilCentre> </Monument> </LimitChangers> <LimitRemovers> <CivilCentre> <RequiredTechs datatype="tokens">town_phase</RequiredTechs> </CivilCentre> </LimitRemovers> </EntityLimits>
Limits
LimitChangers
LimitRemovers
datatype
Required value: tokens
<element name="EntityLimits"> <interleave> <element name="Limits"> <zeroOrMore> <element> <anyName/> <data type="integer"/> </element> </zeroOrMore> </element> <element name="LimitChangers"> <zeroOrMore> <element> <anyName/> <zeroOrMore> <element> <anyName/> <data type="integer"/> </element> </zeroOrMore> </element> </zeroOrMore> </element> <element name="LimitRemovers"> <zeroOrMore> <element> <anyName/> <oneOrMore> <element> <anyName/> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </oneOrMore> </element> </zeroOrMore> </element> </interleave> </element>
Allows this entity to be replaced by mirage entities in the fog-of-war.
<element name="Fogging"> <interleave> <empty/> </interleave> </element>
Approximation of the entity's shape, for collision detection and outline rendering. Shapes are flat horizontal squares or circles, extended vertically to a given height.
<Footprint> <Square width="3.0" height="3.0"/> <Height>0.0</Height> <MaxSpawnDistance>8</MaxSpawnDistance> </Footprint>
<Footprint> <Circle radius="0.5"/> <Height>0.0</Height> <MaxSpawnDistance>8</MaxSpawnDistance> </Footprint>
Square
Set the footprint to a square of the given size.
width
Size of the footprint along the left/right direction (in metres).
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
depth
Size of the footprint along the front/back direction (in metres).
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Circle
Set the footprint to a circle of the given size.
radius
Radius of the footprint (in metres).
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Height
Vertical extent of the footprint (in metres).
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
MaxSpawnDistance
Optional.
Farthest distance units can spawn away from the edge of this entity.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="Footprint"> <interleave> <choice> <element name="Square"> <attribute name="width"> <data type="decimal"> <param name="minExclusive">0.0</param> </data> </attribute> <attribute name="depth"> <data type="decimal"> <param name="minExclusive">0.0</param> </data> </attribute> </element> <element name="Circle"> <attribute name="radius"> <data type="decimal"> <param name="minExclusive">0.0</param> </data> </attribute> </element> </choice> <element name="Height"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="MaxSpawnDistance"> <ref name="nonNegativeDecimal"/> </element> </optional> </interleave> </element>
FormationName
Name of the formation.
Value type: text.
Icon
Value type: text.
RequiredMemberCount
Minimum number of entities the formation should contain.
Value type: non-negative integer (e.g. 0
or 5
).
DisabledTooltip
Tooltip shown when the formation is disabled.
Value type: text.
SpeedMultiplier
The speed of the formation is determined by the minimum speed of all members, multiplied with this number..
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
FormationShape
Formation shape, currently supported are square, triangle and special, where special will be defined in the source code..
Value type: text.
ShiftRows
Set the value to true to shift subsequent rows.
Value type: text.
SortingClasses
Classes will be added to the formation in this order. Where the classes will be added first depends on the formation.
Value type: text.
SortingOrder
Optional.
The order of sorting. This defaults to an order where the formation is filled from the first row to the last, and the center of each row to the sides. Other possible sort orders are "fillFromTheSides", where the most important units are on the sides of each row, and "fillToTheCenter", where the most vulerable units are right in the center of the formation. .
Value type: text.
WidthDepthRatio
Average width/depth, counted in number of units..
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Sloppyness
Sloppyness in meters (the max difference between the actual and the perfectly aligned formation position.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
MinColumns
Optional.
When possible, this number of colums will be created. Overriding the wanted width depth ratio.
Value type: non-negative integer (e.g. 0
or 5
).
MaxColumns
Optional.
When possible within the number of units, and the maximum number of rows, this will be the maximum number of columns..
Value type: non-negative integer (e.g. 0
or 5
).
MaxRows
Optional.
The maximum number of rows in the formation.
Value type: non-negative integer (e.g. 0
or 5
).
CenterGap
Optional.
The size of the central gap, expressed in number of units wide.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
UnitSeparationWidthMultiplier
Place the units in the formation closer or further to each other. The standard separation is the footprint size..
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
UnitSeparationDepthMultiplier
Place the units in the formation closer or further to each other. The standard separation is the footprint size..
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Animations
Give a list of animations to use for the particular formation members, based on their positions.
<element name="Formation"> <interleave> <element name="FormationName"> <text/> </element> <element name="Icon"> <text/> </element> <element name="RequiredMemberCount"> <data type="nonNegativeInteger"/> </element> <element name="DisabledTooltip"> <text/> </element> <element name="SpeedMultiplier"> <ref name="nonNegativeDecimal"/> </element> <element name="FormationShape"> <text/> </element> <element name="ShiftRows"> <text/> </element> <element name="SortingClasses"> <text/> </element> <optional> <element name="SortingOrder"> <text/> </element> </optional> <element name="WidthDepthRatio"> <ref name="nonNegativeDecimal"/> </element> <element name="Sloppyness"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="MinColumns"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="MaxColumns"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="MaxRows"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="CenterGap"> <ref name="nonNegativeDecimal"/> </element> </optional> <element name="UnitSeparationWidthMultiplier"> <ref name="nonNegativeDecimal"/> </element> <element name="UnitSeparationDepthMultiplier"> <ref name="nonNegativeDecimal"/> </element> <element name="Animations"> <zeroOrMore> <element> <anyName/> <text/> </element> </zeroOrMore> </element> </interleave> </element>
CanAttackAsFormation
Value type: text.
<element name="FormationAttack"> <interleave> <element name="CanAttackAsFormation"> <text/> </element> </interleave> </element>
<element name="Foundation"> <interleave> <empty/> </interleave> </element>
Max
Maximum number of entities which can be garrisoned inside this holder.
Value type: positive integer (e.g. 1
or 5
).
List
Classes of entities which are allowed to garrison inside this holder (from Identity).
Value type: text.
datatype
Required value: tokens
EjectHealth
Percentage of maximum health below which this holder no longer allows garrisoning.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
EjectClassesOnDestroy
Classes of entities to be ejected on destroy. Others are killed.
Value type: text.
datatype
Required value: tokens
BuffHeal
Number of hitpoints that will be restored to this holder's garrisoned units each second.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
LoadingRange
The maximum distance from this holder at which entities are allowed to garrison. Should be about 2.0 for land entities and preferably greater for ships.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Pickup
Optional.
This garrisonHolder will move to pick up units to be garrisoned.
Value type: boolean (true
or false
).
VisibleGarrisonPoints
Optional.
Points that will be used to visibly garrison a unit.
X
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Y
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Z
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Angle
Optional.
Angle in degrees relative to the garrisonHolder direction.
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
<element name="GarrisonHolder"> <interleave> <element name="Max"> <data type="positiveInteger"/> </element> <element name="List"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> <element name="EjectHealth"> <ref name="nonNegativeDecimal"/> </element> <element name="EjectClassesOnDestroy"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> <element name="BuffHeal"> <ref name="nonNegativeDecimal"/> </element> <element name="LoadingRange"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="Pickup"> <data type="boolean"/> </element> </optional> <optional> <element name="VisibleGarrisonPoints"> <zeroOrMore> <element> <anyName/> <interleave> <element name="X"> <data type="decimal"/> </element> <element name="Y"> <data type="decimal"/> </element> <element name="Z"> <data type="decimal"/> </element> <optional> <element name="Angle"> <data type="decimal"/> </element> </optional> </interleave> </element> </zeroOrMore> </element> </optional> </interleave> </element>
<element name="Garrisonable"> <interleave> <empty/> </interleave> </element>
Controls behavior of wall gates
<Gate> <PassRange>20</PassRange> </Gate>
PassRange
Units must be within this distance (in meters) of the gate for it to open.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="Gate"> <interleave> <element name="PassRange"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element>
<element name="Guard"> <interleave> <empty/> </interleave> </element>
Controls the healing abilities of the unit.
<Heal> <Range>20</Range> <RangeOverlay> <LineTexture>heal_overlay_range.png</LineTexture> <LineTextureMask>heal_overlay_range_mask.png</LineTextureMask> <LineThickness>0.35</LineThickness> </RangeOverlay> <HP>5</HP> <Rate>2000</Rate> <UnhealableClasses datatype="tokens">Cavalry</UnhealableClasses> <HealableClasses datatype="tokens">Support Infantry</HealableClasses> </Heal>
Range
Range (in metres) where healing is possible.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
RangeOverlay
Optional.
LineTexture
Value type: text.
LineTextureMask
Value type: text.
LineThickness
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
HP
Hitpoints healed per Rate.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Rate
A heal is performed every Rate ms.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
UnhealableClasses
If the target has any of these classes it can not be healed (even if it has a class from HealableClasses).
Value type: text.
datatype
Required value: tokens
HealableClasses
The target must have one of these classes to be healable.
Value type: text.
datatype
Required value: tokens
<element name="Heal"> <interleave> <element name="Range"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="RangeOverlay"> <interleave> <element name="LineTexture"> <text/> </element> <element name="LineTextureMask"> <text/> </element> <element name="LineThickness"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element> </optional> <element name="HP"> <ref name="nonNegativeDecimal"/> </element> <element name="Rate"> <ref name="nonNegativeDecimal"/> </element> <element name="UnhealableClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> <element name="HealableClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </interleave> </element>
Deals with hitpoints and death.
<Health> <Max>100</Max> <RegenRate>1.0</RegenRate> <IdleRegenRate>0</IdleRegenRate> <DeathType>corpse</DeathType> </Health>
Max
Maximum hitpoints.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Initial
Optional.
Initial hitpoints. Default if unspecified is equal to Max.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
DamageVariants
Optional.
RegenRate
Hitpoint regeneration rate per second..
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
IdleRegenRate
Hitpoint regeneration rate per second when idle or garrisoned..
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
DeathType
Behaviour when the unit dies.
Value is one of:
vanish
corpse
remain
SpawnEntityOnDeath
Optional.
Entity template to spawn when this entity dies. Note: this is different than the corpse, which retains the original entity's appearance.
Value type: text.
Unhealable
Indicates that the entity can not be healed by healer units.
Value type: boolean (true
or false
).
<element name="Health"> <interleave> <element name="Max"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="Initial"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="DamageVariants"> <oneOrMore> <element> <anyName/> <data type="decimal"> <param name="minInclusive">0</param> <param name="maxInclusive">1</param> </data> </element> </oneOrMore> </element> </optional> <element name="RegenRate"> <data type="decimal"/> </element> <element name="IdleRegenRate"> <data type="decimal"/> </element> <element name="DeathType"> <choice> <value>vanish</value> <value>corpse</value> <value>remain</value> </choice> </element> <optional> <element name="SpawnEntityOnDeath"> <text/> </element> </optional> <element name="Unhealable"> <data type="boolean"/> </element> </interleave> </element>
Specifies various names and values associated with the unit type, typically for GUI display to users.
<Identity> <Civ>athen</Civ> <GenericName>Athenian Hoplite</GenericName> <SpecificName>Hoplī́tēs Athēnaïkós</SpecificName> <Icon>units/athen_infantry_spearman.png</Icon> </Identity>
Civ
Civilisation that this unit is primarily associated with, typically a 4-letter code. Choices include: gaia (world objects), athen (Athenians), brit (Britons), cart (Carthaginians), gaul (Gauls), iber (Iberians), kush (Kushites), mace (Macedonians), maur (Mauryans), pers (Persians), ptol (Ptolemies), rome (Romans), sele (Seleucids), spart (Spartans).
Value type: text.
Lang
Optional.
Unit language for voices.
Value type: text.
Gender
Optional.
Unit gender for voices. Choices includes male or female..
Value type: text.
GenericName
Generic English-language name for this class of unit..
Value type: text.
SpecificName
Optional.
Specific native-language name for this unit type..
Value type: text.
SelectionGroupName
Optional.
Name used to group ranked entities..
Value type: text.
Tooltip
Optional.
Value type: text.
History
Optional.
Value type: text.
Rank
Optional.
Value is one of:
Basic
Advanced
Elite
Classes
Optional.
Optional list of space-separated classes applying to this entity. Choices include: Animal, Apadana, ArmyCamp, Ashoka, BarterMarket, Celt, CitizenSoldier, CivCentre, Colony, ConquestCritical, Defensive, Domestic, DropsiteFood, DropsiteMetal, DropsiteStone, DropsiteWood, FemaleCitizen, FishingBoat, ForestPlant, Fortress, GarrisonFortress, GarrisonTower, Gates, Human, Iberian, Immortal, Italian, Juggernaut, Kennel, Lighthouse, LongWall, MercenaryCamp, Naval, NavalMarket, Organic, Palace, Palisade, Player, PtolemyIV, SeaCreature, SiegeWall, SpecialBuilding, StoneWall, Structure, Syssiton, Theater, Tower, Unit.
Value type: text.
datatype
Required value: tokens
VisibleClasses
Optional.
Optional list of space-separated classes applying to this entity. These classes will also be visible in various GUI elements. If the classes need spaces, underscores will be replaced with spaces. Choices include: Archer, Barracks, Blacksmith, BoltShooter, Camel, Catapult, Cavalry, Champion, Chariot, Citizen, City, Civic, CivilCentre, Corral, DefenseTower, Dock, Dog, Economic, Elephant, ElephantStables, Embassy, Farmstead, Field, Fireship, Healer, Hero, House, Infantry, Javelin, Maceman, Market, Mechanical, Melee, Mercenary, Military, Outpost, Pike, Ram, Ranged, Relic, Resource, SentryTower, Ship, Shipyard, Siege, SiegeTower, Slave, Sling, Soldier, Spear, Stables, Storehouse, Support, Sword, Temple, Town, Trader, Village, Warship, Wonder, Worker, Workshop.
Value type: text.
datatype
Required value: tokens
Formations
Optional.
Optional list of space-separated formations this unit is allowed to use. Choices include: Scatter, Box, ColumnClosed, LineClosed, ColumnOpen, LineOpen, Flank, Skirmish, Wedge, Testudo, Phalanx, Syntagma, BattleLine.
Value type: text.
datatype
Required value: tokens
Icon
Optional.
Value type: text.
RequiredTechnology
Optional.
Optional name of a technology which must be researched before the entity can be produced..
Value type: text.
Undeletable
Prevent players from deleting this entity..
Value type: boolean (true
or false
).
<element name="Identity"> <interleave> <element name="Civ"> <text/> </element> <optional> <element name="Lang"> <text/> </element> </optional> <optional> <element name="Gender"> <text/> </element> </optional> <element name="GenericName"> <text/> </element> <optional> <element name="SpecificName"> <text/> </element> </optional> <optional> <element name="SelectionGroupName"> <text/> </element> </optional> <optional> <element name="Tooltip"> <text/> </element> </optional> <optional> <element name="History"> <text/> </element> </optional> <optional> <element name="Rank"> <choice> <value>Basic</value> <value>Advanced</value> <value>Elite</value> </choice> </element> </optional> <optional> <element name="Classes"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <optional> <element name="VisibleClasses"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <optional> <element name="Formations"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <optional> <element name="Icon"> <text/> </element> </optional> <optional> <element name="RequiredTechnology"> <text/> </element> </optional> <element name="Undeletable"> <data type="boolean"/> </element> </interleave> </element>
Specifies the loot credited when this entity is killed.
<Loot> <xp>35</xp> <metal>10</metal> </Loot>
food
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
wood
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
stone
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
metal
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
xp
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
<element name="Loot"> <interleave> <interleave> <optional> <element name="food"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="wood"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="stone"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="metal"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="xp"> <data type="nonNegativeInteger"/> </element> </optional> </interleave> </interleave> </element>
<element name="Looter"> <interleave> <empty/> </interleave> </element>
TradeType
Specifies the type of possible trade route (land or naval)..
InternationalBonus
Additional part of the gain donated when two different players trade.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="Market"> <interleave> <element name="TradeType"> <list> <oneOrMore> <choice> <value>land</value> <value>naval</value> </choice> </oneOrMore> </list> </element> <element name="InternationalBonus"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element>
Type
Value is one of:
food
wood
stone
metal
structure
unit
support
hero
Color
Optional.
r
Value type: integer.
g
Value type: integer.
b
Value type: integer.
<element name="Minimap"> <interleave> <element name="Type"> <choice> <value>food</value> <value>wood</value> <value>stone</value> <value>metal</value> <value>structure</value> <value>unit</value> <value>support</value> <value>hero</value> </choice> </element> <optional> <element name="Color"> <attribute name="r"> <data type="integer"> <param name="minInclusive">0</param> <param name="maxInclusive">255</param> </data> </attribute> <attribute name="g"> <data type="integer"> <param name="minInclusive">0</param> <param name="maxInclusive">255</param> </data> </attribute> <attribute name="b"> <data type="integer"> <param name="minInclusive">0</param> <param name="maxInclusive">255</param> </data> </attribute> </element> </optional> </interleave> </element>
Mirage entities replace real entities in the fog-of-war.
<element name="Mirage"> <interleave> <empty/> </interleave> </element>
Causes this entity to obstruct the motion of other units.
<Obstruction/>
Static
width
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
depth
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Unit
Obstructions
x
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
z
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
width
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
depth
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Active
If false, this entity will be ignored in collision tests by other units but can still perform its own collision tests.
Value type: boolean (true
or false
).
BlockMovement
Whether units should be allowed to walk through this entity.
Value type: boolean (true
or false
).
BlockPathfinding
Whether the long-distance pathfinder should avoid paths through this entity. This should only be set for large stationary obstructions.
Value type: boolean (true
or false
).
BlockFoundation
Whether players should be unable to place building foundations on top of this entity. If true, BlockConstruction should be true too.
Value type: boolean (true
or false
).
BlockConstruction
Whether players should be unable to begin constructing buildings placed on top of this entity.
Value type: boolean (true
or false
).
DeleteUponConstruction
Whether this entity should be deleted when construction on a buildings placed on top of this entity is started..
Value type: boolean (true
or false
).
DisableBlockMovement
If true, BlockMovement will be overridden and treated as false. (This is a special case to handle foundations).
Value type: boolean (true
or false
).
DisableBlockPathfinding
If true, BlockPathfinding will be overridden and treated as false. (This is a special case to handle foundations).
Value type: boolean (true
or false
).
ControlPersist
Optional.
If present, the control group of this entity will be given to entities that are colliding with it..
<element name="Obstruction"> <interleave> <choice> <element name="Static"> <attribute name="width"> <data type="decimal"> <param name="minInclusive">1.5</param> </data> </attribute> <attribute name="depth"> <data type="decimal"> <param name="minInclusive">1.5</param> </data> </attribute> </element> <element name="Unit"> <empty/> </element> <element name="Obstructions"> <zeroOrMore> <element> <anyName/> <optional> <attribute name="x"> <data type="decimal"/> </attribute> </optional> <optional> <attribute name="z"> <data type="decimal"/> </attribute> </optional> <attribute name="width"> <data type="decimal"> <param name="minInclusive">1.5</param> </data> </attribute> <attribute name="depth"> <data type="decimal"> <param name="minInclusive">1.5</param> </data> </attribute> </element> </zeroOrMore> </element> </choice> <element name="Active"> <data type="boolean"/> </element> <element name="BlockMovement"> <data type="boolean"/> </element> <element name="BlockPathfinding"> <data type="boolean"/> </element> <element name="BlockFoundation"> <data type="boolean"/> </element> <element name="BlockConstruction"> <data type="boolean"/> </element> <element name="DeleteUponConstruction"> <data type="boolean"/> </element> <element name="DisableBlockMovement"> <data type="boolean"/> </element> <element name="DisableBlockPathfinding"> <data type="boolean"/> </element> <optional> <element name="ControlPersist"> <empty/> </element> </optional> </interleave> </element>
<element name="OverlayRenderer"> <interleave> <empty/> </interleave> </element>
Allows this entity to be owned by players.
<Ownership/>
<element name="Ownership"> <interleave> <empty/> </interleave> </element>
Entity
Entity to transform into.
Value type: text.
Time
Time required to transform this entity, in milliseconds.
Value type: non-negative integer (e.g. 0
or 5
).
State
Whether this entity is packed or unpacked.
Value is one of:
packed
unpacked
<element name="Pack"> <interleave> <element name="Entity"> <text/> </element> <element name="Time"> <data type="nonNegativeInteger"/> </element> <element name="State"> <choice> <value>packed</value> <value>unpacked</value> </choice> </element> </interleave> </element>
BarterMultiplier
Multipliers for barter prices..
Buy
Multipliers for the buy prices..
food
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
wood
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
stone
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
metal
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
Sell
Multipliers for the sell prices..
food
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
wood
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
stone
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
metal
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
SharedLosTech
Allies will share los when this technology is researched. Leave empty to never share LOS..
Value type: text.
SharedDropsitesTech
Allies will share dropsites when this technology is researched. Leave empty to never share dropsites..
Value type: text.
SpyCostMultiplier
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="Player"> <interleave> <element name="BarterMultiplier"> <interleave> <element name="Buy"> <interleave> <optional> <element name="food"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="wood"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="stone"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="metal"> <ref name="positiveDecimal"/> </element> </optional> </interleave> </element> <element name="Sell"> <interleave> <optional> <element name="food"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="wood"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="stone"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="metal"> <ref name="positiveDecimal"/> </element> </optional> </interleave> </element> </interleave> </element> <element name="SharedLosTech"> <text/> </element> <element name="SharedDropsitesTech"> <text/> </element> <element name="SpyCostMultiplier"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element>
Allows this entity to exist at a location (and orientation) in the world, and defines some details of the positioning.
<Position> <Anchor>upright</Anchor> <Altitude>0.0</Altitude> <Floating>false</Floating> <FloatDepth>0.0</FloatDepth> <TurnRate>6.0</TurnRate> </Position>
Anchor
Automatic rotation to follow the slope of terrain.
Value is one of:
upright
pitch
roll
pitch-roll
Altitude
Height above terrain in metres.
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Floating
Whether the entity floats on water.
Value type: boolean (true
or false
).
FloatDepth
The depth at which an entity floats on water (needs Floating to be true).
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
TurnRate
Maximum graphical rotation speed around Y axis, in radians per second.
Value type: positive decimal (e.g. 1.0
or 2.5
).
<element name="Position"> <interleave> <element name="Anchor"> <choice> <value>upright</value> <value>pitch</value> <value>roll</value> <value>pitch-roll</value> </choice> </element> <element name="Altitude"> <data type="decimal"/> </element> <element name="Floating"> <data type="boolean"/> </element> <element name="FloatDepth"> <ref name="nonNegativeDecimal"/> </element> <element name="TurnRate"> <ref name="positiveDecimal"/> </element> </interleave> </element>
Allows the building to train new units and research technologies
<ProductionQueue> <BatchTimeModifier>0.7</BatchTimeModifier> <Entities datatype="tokens"> units/{civ}_support_female_citizen units/{native}_support_trader units/athen_infantry_spearman_b </Entities> </ProductionQueue>
BatchTimeModifier
Modifier that influences the time benefit for batch training.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Entities
Optional.
Space-separated list of entity template names that this entity can train. The special string "{civ}" will be automatically replaced by the civ code of the entity's owner, while the string "{native}" will be automatically replaced by the entity's civ code..
Value type: text.
datatype
Required value: tokens
Technologies
Optional.
Space-separated list of technology names that this building can research. When present, the special string "{civ}" will be automatically replaced either by the civ code of the building's owner if such a tech exists, or by "generic"..
Value type: text.
datatype
Required value: tokens
TechCostMultiplier
Multiplier to modify ressources cost and research time of technologies searched in this building..
food
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
wood
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
stone
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
metal
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
time
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="ProductionQueue"> <interleave> <element name="BatchTimeModifier"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="Entities"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <optional> <element name="Technologies"> <attribute name="datatype"> <value>tokens</value> </attribute> <text/> </element> </optional> <element name="TechCostMultiplier"> <interleave> <optional> <element name="food"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="wood"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="stone"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="metal"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="time"> <ref name="nonNegativeDecimal"/> </element> </optional> </interleave> </element> </interleave> </element>
Entity
Value type: text.
RequiredXp
Value type: positive integer (e.g. 1
or 5
).
<element name="Promotion"> <interleave> <element name="Entity"> <text/> </element> <element name="RequiredXp"> <data type="positiveInteger"/> </element> </interleave> </element>
<element name="RallyPoint"> <interleave> <empty/> </interleave> </element>
Displays a rally point marker where created units will gather when spawned
<RallyPointRenderer> <MarkerTemplate>special/rallypoint</MarkerTemplate> <LineThickness>0.75</LineThickness> <LineStartCap>round</LineStartCap> <LineEndCap>square</LineEndCap> <LineDashColor r="158" g="11" b="15"/> <LinePassabilityClass>default</LinePassabilityClass> </RallyPointRenderer>
MarkerTemplate
Template name for the rally point marker entity (typically a waypoint flag actor).
Value type: text.
LineTexture
Texture file to use for the rally point line.
Value type: text.
LineTextureMask
Texture mask to indicate where overlay colors are to be applied (see LineColor and LineDashColor).
Value type: text.
LineThickness
Thickness of the marker line connecting the entity to the rally point marker.
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
LineDashColor
r
Value type: integer.
g
Value type: integer.
b
Value type: integer.
LineStartCap
Value is one of:
flat
round
sharp
square
LineEndCap
Value is one of:
flat
round
sharp
square
LinePassabilityClass
The pathfinder passability class to use for computing the rally point marker line path.
Value type: text.
<element name="RallyPointRenderer"> <interleave> <element name="MarkerTemplate"> <text/> </element> <element name="LineTexture"> <text/> </element> <element name="LineTextureMask"> <text/> </element> <element name="LineThickness"> <data type="decimal"/> </element> <element name="LineDashColor"> <attribute name="r"> <data type="integer"> <param name="minInclusive">0</param> <param name="maxInclusive">255</param> </data> </attribute> <attribute name="g"> <data type="integer"> <param name="minInclusive">0</param> <param name="maxInclusive">255</param> </data> </attribute> <attribute name="b"> <data type="integer"> <param name="minInclusive">0</param> <param name="maxInclusive">255</param> </data> </attribute> </element> <element name="LineStartCap"> <choice> <value>flat</value> <value>round</value> <value>sharp</value> <value>square</value> </choice> </element> <element name="LineEndCap"> <choice> <value>flat</value> <value>round</value> <value>sharp</value> <value>square</value> </choice> </element> <element name="LinePassabilityClass"> <text/> </element> </interleave> </element>
<element name="RangeOverlayManager"> <interleave> <empty/> </interleave> </element>
Deals with repairable structures and units.
<Repairable> <RepairTimeRatio>2.0</RepairTimeRatio> </Repairable>
RepairTimeRatio
repair time ratio relative to building (or production) time..
Value type: positive decimal (e.g. 1.0
or 2.5
).
<element name="Repairable"> <interleave> <element name="RepairTimeRatio"> <ref name="positiveDecimal"/> </element> </interleave> </element>
Types
Sharable
Allows allies to use this entity..
Value type: boolean (true
or false
).
<element name="ResourceDropsite"> <interleave> <element name="Types"> <list> <zeroOrMore> <choice> <value>food</value> <value>wood</value> <value>stone</value> <value>metal</value> </choice> </zeroOrMore> </list> </element> <element name="Sharable"> <data type="boolean"/> </element> </interleave> </element>
Lets the unit gather resources from entities that have the ResourceSupply component.
<ResourceGatherer> <MaxDistance>2.0</MaxDistance> <BaseSpeed>1.0</BaseSpeed> <Rates> <food.fish>1</food.fish> <metal.ore>3</metal.ore> <stone.rock>3</stone.rock> <wood.tree>2</wood.tree> </Rates> <Capacities> <food>10</food> <metal>10</metal> <stone>10</stone> <wood>10</wood> </Capacities> </ResourceGatherer>
MaxDistance
Max resource-gathering distance.
Value type: positive decimal (e.g. 1.0
or 2.5
).
BaseSpeed
Base resource-gathering rate (in resource units per second).
Value type: positive decimal (e.g. 1.0
or 2.5
).
Rates
Per-resource-type gather rate multipliers. If a resource type is not specified then it cannot be gathered by this unit.
food
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
wood
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
stone
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
metal
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
treasure
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
food.fish
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
food.fruit
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
food.grain
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
food.meat
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
wood.tree
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
wood.ruins
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
stone.rock
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
stone.ruins
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
metal.ore
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
treasure.food
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
treasure.wood
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
treasure.stone
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
treasure.metal
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
Capacities
Per-resource-type maximum carrying capacity.
food
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
wood
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
stone
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
metal
Optional.
Value type: positive decimal (e.g. 1.0
or 2.5
).
<element name="ResourceGatherer"> <interleave> <element name="MaxDistance"> <ref name="positiveDecimal"/> </element> <element name="BaseSpeed"> <ref name="positiveDecimal"/> </element> <element name="Rates"> <interleave> <optional> <element name="food"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="wood"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="stone"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="metal"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="treasure"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="food.fish"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="food.fruit"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="food.grain"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="food.meat"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="wood.tree"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="wood.ruins"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="stone.rock"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="stone.ruins"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="metal.ore"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="treasure.food"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="treasure.wood"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="treasure.stone"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="treasure.metal"> <ref name="positiveDecimal"/> </element> </optional> </interleave> </element> <element name="Capacities"> <interleave> <optional> <element name="food"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="wood"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="stone"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="metal"> <ref name="positiveDecimal"/> </element> </optional> </interleave> </element> </interleave> </element>
Provides a supply of one particular type of resource.
<ResourceSupply> <Amount>1000</Amount> <Type>food.meat</Type> <KillBeforeGather>false</KillBeforeGather> <MaxGatherers>25</MaxGatherers> <DiminishingReturns>0.8</DiminishingReturns> </ResourceSupply>
KillBeforeGather
Whether this entity must be killed (health reduced to 0) before its resources can be gathered.
Value type: boolean (true
or false
).
Amount
Amount of resources available from this entity.
Type
Type and Subtype of resource available from this entity.
Value is one of:
food.fish
food.fruit
food.grain
food.meat
treasure.food
wood.tree
wood.ruins
treasure.wood
stone.rock
stone.ruins
treasure.stone
metal.ore
treasure.metal
MaxGatherers
Amount of gatherers who can gather resources from this entity at the same time.
Value type: non-negative integer (e.g. 0
or 5
).
DiminishingReturns
Optional.
The relative rate of any new gatherer compared to the previous one (geometric sequence). Leave the element out for no diminishing returns..
Value type: positive decimal (e.g. 1.0
or 2.5
).
<element name="ResourceSupply"> <interleave> <element name="KillBeforeGather"> <data type="boolean"/> </element> <element name="Amount"> <choice> <data type="nonNegativeInteger"/> <value>Infinity</value> </choice> </element> <element name="Type"> <choice> <value>food.fish</value> <value>food.fruit</value> <value>food.grain</value> <value>food.meat</value> <value>treasure.food</value> <value>wood.tree</value> <value>wood.ruins</value> <value>treasure.wood</value> <value>stone.rock</value> <value>stone.ruins</value> <value>treasure.stone</value> <value>metal.ore</value> <value>treasure.metal</value> </choice> </element> <element name="MaxGatherers"> <data type="nonNegativeInteger"/> </element> <optional> <element name="DiminishingReturns"> <ref name="positiveDecimal"/> </element> </optional> </interleave> </element>
Controls the resource trickle ability of the unit.
Rates
Trickle Rates.
food
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
wood
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
stone
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
metal
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Interval
Number of miliseconds must pass for the player to gain the next trickle..
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="ResourceTrickle"> <interleave> <element name="Rates"> <interleave> <optional> <element name="food"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="wood"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="stone"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="metal"> <ref name="nonNegativeDecimal"/> </element> </optional> </interleave> </element> <element name="Interval"> <ref name="nonNegativeDecimal"/> </element> </interleave> </element>
Allows this entity to be selected by the player.
<Selectable/>
EditorOnly
Optional.
If this element is present, the entity is only selectable in Atlas.
Overlay
Specifies the type of overlay to be displayed when this entity is selected.
AlwaysVisible
Optional.
If this element is present, the selection overlay will always be visible (with transparency and desaturation).
Texture
Displays a texture underneath the entity..
MainTexture
Texture to display underneath the entity. Filepath relative to art/textures/selection/..
Value type: text.
MainTextureMask
Mask texture that controls where to apply player color. Filepath relative to art/textures/selection/..
Value type: text.
Outline
Traces the outline of the entity with a line texture..
LineTexture
Texture to apply to the line. Filepath relative to art/textures/selection/..
Value type: text.
LineTextureMask
Texture that controls where to apply player color. Filepath relative to art/textures/selection/..
Value type: text.
LineThickness
Thickness of the line, in world units..
Value type: positive decimal (e.g. 1.0
or 2.5
).
<element name="Selectable"> <interleave> <optional> <element name="EditorOnly"> <empty/> </element> </optional> <element name="Overlay"> <optional> <element name="AlwaysVisible"> <empty/> </element> </optional> <choice> <element name="Texture"> <element name="MainTexture"> <text/> </element> <element name="MainTextureMask"> <text/> </element> </element> <element name="Outline"> <element name="LineTexture"> <text/> </element> <element name="LineTextureMask"> <text/> </element> <element name="LineThickness"> <ref name="positiveDecimal"/> </element> </element> </choice> </element> </interleave> </element>
<element name="Settlement"> <interleave> <empty/> </interleave> </element>
general
Optional.
The general element replaces {civ} with the civ code..
<element name="SkirmishReplacer"> <interleave> <optional> <element name="general"> <interleave> <text/> </interleave> </element> </optional> </interleave> </element>
Lists the sound groups associated with this unit.
<Sound> <SoundGroups> <walk>actor/human/movement/walk.xml</walk> <run>actor/human/movement/walk.xml</run> <attack_melee>attack/weapon/sword.xml</attack_melee> <death>actor/human/death/death.xml</death> </SoundGroups> </Sound>
SoundGroups
<element name="Sound"> <interleave> <element name="SoundGroups"> <zeroOrMore> <element> <anyName/> <text/> </element> </zeroOrMore> </element> </interleave> </element>
<element name="StatisticsTracker"> <interleave> <empty/> </interleave> </element>
BarWidth
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
BarHeight
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
HeightOffset
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
<element name="StatusBars"> <interleave> <element name="BarWidth"> <data type="decimal"/> </element> <element name="BarHeight"> <data type="decimal"/> </element> <element name="HeightOffset"> <data type="decimal"/> </element> </interleave> </element>
<element name="TechnologyManager"> <interleave> <empty/> </interleave> </element>
DecayRate
Decay rate in capture points per second.
<element name="TerritoryDecay"> <interleave> <element name="DecayRate"> <choice> <ref name="positiveDecimal"/> <value>Infinity</value> </choice> </element> </interleave> </element>
Root
Value type: boolean (true
or false
).
Weight
Value type: non-negative integer (e.g. 0
or 5
).
Radius
Value type: non-negative integer (e.g. 0
or 5
).
<element name="TerritoryInfluence"> <interleave> <element name="Root"> <data type="boolean"/> </element> <element name="Weight"> <data type="nonNegativeInteger"> <param name="maxInclusive">65535</param> </data> </element> <element name="Radius"> <data type="nonNegativeInteger"/> </element> </interleave> </element>
Lets the unit generate resouces while moving between markets (or docks in case of water trading).
<Trader> <GainMultiplier>0.75</GainMultiplier> </Trader>
GainMultiplier
Trader gain for a 100m distance and mapSize = 1024.
Value type: positive decimal (e.g. 1.0
or 2.5
).
<element name="Trader"> <interleave> <element name="GainMultiplier"> <ref name="positiveDecimal"/> </element> </interleave> </element>
Specifies unit training restrictions, currently only unit category
<TrainingRestrictions> <TrainingRestrictions> <Category>Hero</Category> </TrainingRestrictions> </TrainingRestrictions>
Category
Specifies the category of this unit, for satisfying special constraints. Choices include: Hero, Juggernaut, WarDog.
Value type: text.
<element name="TrainingRestrictions"> <interleave> <element name="Category"> <text/> </element> </interleave> </element>
Reference
Optional.
Value type: text.
<element name="TriggerPoint"> <interleave> <optional> <element name="Reference"> <text/> </element> </optional> </interleave> </element>
Controls the unit's movement, attacks, etc, in response to commands from the player.
<UnitAI/>
DefaultStance
Value is one of:
violent
aggressive
defensive
passive
standground
FormationController
Value type: boolean (true
or false
).
FleeDistance
Value type: positive decimal (e.g. 1.0
or 2.5
).
CanGuard
Value type: boolean (true
or false
).
CanPatrol
Value type: boolean (true
or false
).
NaturalBehaviour
Behaviour of the unit in the absence of player commands (intended for animals).
Value is one of:
violent
aggressive
defensive
passive
skittish
domestic
RoamDistance
Value type: positive decimal (e.g. 1.0
or 2.5
).
RoamTimeMin
Value type: positive decimal (e.g. 1.0
or 2.5
).
RoamTimeMax
Value type: positive decimal (e.g. 1.0
or 2.5
).
FeedTimeMin
Value type: positive decimal (e.g. 1.0
or 2.5
).
FeedTimeMax
Value type: positive decimal (e.g. 1.0
or 2.5
).
<element name="UnitAI"> <interleave> <element name="DefaultStance"> <choice> <value>violent</value> <value>aggressive</value> <value>defensive</value> <value>passive</value> <value>standground</value> </choice> </element> <element name="FormationController"> <data type="boolean"/> </element> <element name="FleeDistance"> <ref name="positiveDecimal"/> </element> <element name="CanGuard"> <data type="boolean"/> </element> <element name="CanPatrol"> <data type="boolean"/> </element> <optional> <interleave> <element name="NaturalBehaviour"> <choice> <value>violent</value> <value>aggressive</value> <value>defensive</value> <value>passive</value> <value>skittish</value> <value>domestic</value> </choice> </element> <element name="RoamDistance"> <ref name="positiveDecimal"/> </element> <element name="RoamTimeMin"> <ref name="positiveDecimal"/> </element> <element name="RoamTimeMax"> <ref name="positiveDecimal"/> </element> <element name="FeedTimeMin"> <ref name="positiveDecimal"/> </element> <element name="FeedTimeMax"> <ref name="positiveDecimal"/> </element> </interleave> </optional> </interleave> </element>
Provides the unit with the ability to move around the world by itself.
<UnitMotion> <WalkSpeed>7.0</WalkSpeed> <PassabilityClass>default</PassabilityClass> </UnitMotion>
FormationController
Value type: boolean (true
or false
).
WalkSpeed
Basic movement speed (in metres per second).
Value type: positive decimal (e.g. 1.0
or 2.5
).
Run
Optional.
Speed
Value type: positive decimal (e.g. 1.0
or 2.5
).
Range
Value type: positive decimal (e.g. 1.0
or 2.5
).
RangeMin
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
RegenTime
Value type: positive decimal (e.g. 1.0
or 2.5
).
DecayTime
Value type: positive decimal (e.g. 1.0
or 2.5
).
PassabilityClass
Identifies the terrain passability class (values are defined in special/pathfinder.xml).
Value type: text.
<element name="UnitMotion"> <interleave> <element name="FormationController"> <data type="boolean"/> </element> <element name="WalkSpeed"> <ref name="positiveDecimal"/> </element> <optional> <element name="Run"> <interleave> <element name="Speed"> <ref name="positiveDecimal"/> </element> <element name="Range"> <ref name="positiveDecimal"/> </element> <element name="RangeMin"> <ref name="nonNegativeDecimal"/> </element> <element name="RegenTime"> <ref name="positiveDecimal"/> </element> <element name="DecayTime"> <ref name="positiveDecimal"/> </element> </interleave> </element> </optional> <element name="PassabilityClass"> <text/> </element> </interleave> </element>
MaxSpeed
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
TakeoffSpeed
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
LandingSpeed
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
AccelRate
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
SlowingRate
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
BrakingRate
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
TurnRate
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
OvershootTime
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
FlyingHeight
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
ClimbRate
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
DiesInWater
Value type: boolean (true
or false
).
PassabilityClass
Value type: text.
<element name="UnitMotionFlying"> <interleave> <element name="MaxSpeed"> <ref name="nonNegativeDecimal"/> </element> <element name="TakeoffSpeed"> <ref name="nonNegativeDecimal"/> </element> <element name="LandingSpeed"> <ref name="nonNegativeDecimal"/> </element> <element name="AccelRate"> <ref name="nonNegativeDecimal"/> </element> <element name="SlowingRate"> <ref name="nonNegativeDecimal"/> </element> <element name="BrakingRate"> <ref name="nonNegativeDecimal"/> </element> <element name="TurnRate"> <ref name="nonNegativeDecimal"/> </element> <element name="OvershootTime"> <ref name="nonNegativeDecimal"/> </element> <element name="FlyingHeight"> <data type="decimal"/> </element> <element name="ClimbRate"> <ref name="nonNegativeDecimal"/> </element> <element name="DiesInWater"> <data type="boolean"/> </element> <element name="PassabilityClass"> <text/> </element> </interleave> </element>
Entity
Entity to upgrade to.
Value type: text.
Icon
Optional.
Icon to show in the GUI.
Value type: text.
Tooltip
Optional.
This will be added to the tooltip to help the player choose why to upgrade..
Value type: text.
Time
Optional.
Time required to upgrade this entity, in seconds.
Value type: non-negative integer (e.g. 0
or 5
).
Cost
Optional.
Resource cost to upgrade this unit.
food
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
wood
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
stone
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
metal
Optional.
Value type: non-negative integer (e.g. 0
or 5
).
RequiredTechnology
Optional.
Define what technology is required for this upgrade.
CheckPlacementRestrictions
Optional.
Upgrading will check for placement restrictions (nb:GUI only).
<element name="Upgrade"> <interleave> <oneOrMore> <element> <anyName/> <interleave> <element name="Entity"> <text/> </element> <optional> <element name="Icon"> <text/> </element> </optional> <optional> <element name="Tooltip"> <text/> </element> </optional> <optional> <element name="Time"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="Cost"> <oneOrMore> <choice> <interleave> <optional> <element name="food"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="wood"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="stone"> <data type="nonNegativeInteger"/> </element> </optional> <optional> <element name="metal"> <data type="nonNegativeInteger"/> </element> </optional> </interleave> </choice> </oneOrMore> </element> </optional> <optional> <element name="RequiredTechnology"> <choice> <text/> <empty/> </choice> </element> </optional> <optional> <element name="CheckPlacementRestrictions"> <empty/> </element> </optional> </interleave> </element> </oneOrMore> </interleave> </element>
RetainInFog
Value type: boolean (true
or false
).
AlwaysVisible
Value type: boolean (true
or false
).
Corpse
Value type: boolean (true
or false
).
Preview
Value type: boolean (true
or false
).
<element name="Visibility"> <interleave> <element name="RetainInFog"> <data type="boolean"/> </element> <element name="AlwaysVisible"> <data type="boolean"/> </element> <element name="Corpse"> <data type="boolean"/> </element> <element name="Preview"> <data type="boolean"/> </element> </interleave> </element>
Range
Value type: non-negative integer (e.g. 0
or 5
).
RevealShore
Optional.
Value type: boolean (true
or false
).
<element name="Vision"> <interleave> <element name="Range"> <data type="nonNegativeInteger"/> </element> <optional> <element name="RevealShore"> <data type="boolean"/> </element> </optional> </interleave> </element>
Bribable
Value type: boolean (true
or false
).
Duration
Optional.
Duration (in second) of the vision sharing for spies.
Value type: positive decimal (e.g. 1.0
or 2.5
).
FailureCostRatio
Optional.
Fraction of the bribe cost that will be incured if a bribe failed.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
<element name="VisionSharing"> <interleave> <element name="Bribable"> <data type="boolean"/> </element> <optional> <element name="Duration"> <ref name="positiveDecimal"/> </element> </optional> <optional> <element name="FailureCostRatio"> <ref name="nonNegativeDecimal"/> </element> </optional> </interleave> </element>
Display the unit using the engine's actor system.
<VisualActor> <Actor>units/hellenes/infantry_spearman_b.xml</Actor> </VisualActor>
<VisualActor> <Actor>structures/hellenes/barracks.xml</Actor> <FoundationActor>structures/fndn_4x4.xml</FoundationActor> </VisualActor>
Actor
Filename of the actor to be used for this unit.
Value type: text.
FoundationActor
Optional.
Filename of the actor to be used the foundation while this unit is being constructed.
Value type: text.
Foundation
Optional.
Used internally; if present, the unit will be rendered as a foundation.
ConstructionPreview
Optional.
If present, the unit should have a construction preview.
DisableShadows
Optional.
Used internally; if present, shadows will be disabled.
ActorOnly
Optional.
Used internally; if present, the unit will only be rendered if the user has high enough graphical settings..
SilhouetteDisplay
Value type: boolean (true
or false
).
SilhouetteOccluder
Value type: boolean (true
or false
).
SelectionShape
Optional.
Bounds
Determines the selection box based on the model bounds.
Footprint
Determines the selection box based on the entity Footprint component.
Box
Sets the selection shape to a box of specified dimensions.
width
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
height
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
depth
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Cylinder
Sets the selection shape to a cylinder of specified dimensions.
radius
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
height
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
VisibleInAtlasOnly
Value type: boolean (true
or false
).
<element name="VisualActor"> <interleave> <element name="Actor"> <text/> </element> <optional> <element name="FoundationActor"> <text/> </element> </optional> <optional> <element name="Foundation"> <empty/> </element> </optional> <optional> <element name="ConstructionPreview"> <empty/> </element> </optional> <optional> <element name="DisableShadows"> <empty/> </element> </optional> <optional> <element name="ActorOnly"> <empty/> </element> </optional> <element name="SilhouetteDisplay"> <data type="boolean"/> </element> <element name="SilhouetteOccluder"> <data type="boolean"/> </element> <optional> <element name="SelectionShape"> <choice> <element name="Bounds"> <empty/> </element> <element name="Footprint"> <empty/> </element> <element name="Box"> <attribute name="width"> <data type="decimal"> <param name="minExclusive">0.0</param> </data> </attribute> <attribute name="height"> <data type="decimal"> <param name="minExclusive">0.0</param> </data> </attribute> <attribute name="depth"> <data type="decimal"> <param name="minExclusive">0.0</param> </data> </attribute> </element> <element name="Cylinder"> <attribute name="radius"> <data type="decimal"> <param name="minExclusive">0.0</param> </data> </attribute> <attribute name="height"> <data type="decimal"> <param name="minExclusive">0.0</param> </data> </attribute> </element> </choice> </element> </optional> <element name="VisibleInAtlasOnly"> <data type="boolean"/> </element> </interleave> </element>
<WallPiece/>
Length
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Orientation
Optional.
Value type: non-negative decimal (e.g. 0.0
or 2.5
).
Indent
Optional.
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
Bend
Optional.
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
<element name="WallPiece"> <interleave> <element name="Length"> <ref name="nonNegativeDecimal"/> </element> <optional> <element name="Orientation"> <ref name="nonNegativeDecimal"/> </element> </optional> <optional> <element name="Indent"> <data type="decimal"/> </element> </optional> <optional> <element name="Bend"> <data type="decimal"/> </element> </optional> </interleave> </element>
<WallSet/>
Templates
Tower
Template name of the tower piece.
Value type: text.
Gate
Template name of the gate piece.
Value type: text.
WallLong
Template name of the long wall segment.
Value type: text.
WallMedium
Template name of the medium-size wall segment.
Value type: text.
WallShort
Template name of the short wall segment.
Value type: text.
WallCurves
Optional.
Space-separated list of template names of curving wall segments..
Value type: text.
WallEnd
Optional.
Value type: text.
Fort
Optional.
Value type: text.
MinTowerOverlap
Maximum fraction that wall segments are allowed to overlap towers, where 0 signifies no overlap and 1 full overlap.
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
MaxTowerOverlap
Minimum fraction that wall segments are required to overlap towers, where 0 signifies no overlap and 1 full overlap.
Value type: decimal (e.g. -10.0
or 0.0
or 2.5
).
<element name="WallSet"> <interleave> <element name="Templates"> <interleave> <element name="Tower"> <text/> </element> <element name="Gate"> <text/> </element> <element name="WallLong"> <text/> </element> <element name="WallMedium"> <text/> </element> <element name="WallShort"> <text/> </element> <optional> <element name="WallCurves"> <text/> </element> </optional> <optional> <element name="WallEnd"> <text/> </element> </optional> <optional> <element name="Fort"> <text/> </element> </optional> </interleave> </element> <element name="MinTowerOverlap"> <data type="decimal"> <param name="minInclusive">0.0</param> <param name="maxInclusive">1.0</param> </data> </element> <element name="MaxTowerOverlap"> <data type="decimal"> <param name="minInclusive">0.0</param> <param name="maxInclusive">1.0</param> </data> </element> </interleave> </element>
<element name="Wonder"> <interleave> <empty/> </interleave> </element>