TOTAL WAR WIKI

Total War: ATTILA KIT - Army Tags

Army tags

24 April 2015

14:54

 

<army> tag

 

Child of: <alliance>

 

The <army> tag defines an army participating in the battle. It principally sets out the faction that the army belongs to and the units the army contains. It can also specify where the army can deploy and what equipment the army brings to the battlefield.

 

The first army of the first alliance is always controlled by the player. Internally, armies are numbered in order of declaration, rising from 0.

 

Attributes

 

Attributes are defined with the <army> tag itself. They are optional.

 

ATTRIBUTE

DESCRIPTION

hide_results

Does not show this army on the results screen. Example:

 

<army hide_results="true">

<!-- army declaration -->

</army>

approach_angle

Only useful for reinforcement armies. Defines the angle in degrees from north that this army will enter the battlefield at. 0 would be from the north, 90 from the east, 180 from the south and 270 from the west (intermediate angles also supported). Example:

 

<army approach_angle="220">

<!-- army declaration -->

</army>

 

 

Mandatory Child Tags

 

The <army> tag must contain the following child tags:

 

TAG

DESCRIPTION

<faction>

Defines the faction this army belongs to, by faction key. The enclosed key must match a record in the factions table in the database. Example:

 

<faction>att_fact_alani</faction>

<unit>

Defines a unit that belongs to this army.

 

Optional Child Tags

 

The <army> tag may optionally contain the following child tags:

 

TAG

DESCRIPTION

<camera_start_position>

Defines where the camera starts the battle for this army. Only useful if a human player will be controlling this army. Must be accompanied by a <camera_target_position> tag to work. Example:

 

<camera_start_position x="-26.5" y="812.2" z="109.4" />

<camera_target_position>

Defines where the camera is looking at the start of battle for this army. Must be accompanied by a <camera_start_position> to work. Example:

 

<camera_target_position x="-27.3" y="769.2" z="2.8" />

<deployment_area>

Allows definition of an area in which this army can deploy. If a deployment area is not supplied here, the deployment areas in the battle map definition will be used instead.

<deployment_area_alliance_index>

If a deployment area is not defined, the armies will be given deployment areas specified in the underlying map in order of declaration. If this order is not desired it can be overridden using this tag and <deployment_area_army_index> below. This is mainly useful for siege maps where it's desired that the player is the defender. Example:

 

<deployment_area_alliance_index>1</deployment_area_alliance_index>

<deployment_area_army_index>

This tag allows the content creator to override the map deployment area used (see <deployment_area_alliance_index> above also). Example:

 

<deployment_area_army_index>2</deployment_area_army_index>

<assault_equipment>

Allows definition of any assault equipment (siege weapons) this army starts the battle with.

<deployables>

Allows definition of any deployable defences this army starts the battle with.

<building_mountable_artillery>

Allows definition of an item of mountable artillery (e.g. onagers on walls) that this army starts the battle with.

<reinforcement_army>

Defines any reinforcing army for this army. Unlike a reinforcing army declared under the alliance, which would be autonomous, units declared in this army will be drip-fed into the main army and would be available for control by any player in command of that army.

<army_name>

Allows definition of a name for this army, which is shown on the loading screen. Example:

 

<army_name>Caesar's Veterans</army_name>

<not_allowed_to_choose_deployment>

This army will not be able to redeploy if this tag is present. Example:

 

<not_allowed_to_choose_deployment />

<can_withdraw>

 

Sets whether this army will be able to withdraw in battle. Example:

 

<can_withdraw>false</can_withdraw>

 

Example

 

See the supplied example definition xml for an example of a full army tag.

 

 

 

 

 

 

 

 

 

 

<reinforcement_army>

 

Child of: <army> or <alliance>

 

Allows definition of a reinforcing army. If the <reinforcement_army> tag is a child of an <army> tag, then the units in the reinforcing army shall be drip-fed into the host army. If the <reinforcement_army> tag is a child of an <alliance> tag, then the units will be part of their own army and will be controlled by the AI.

 

The <reinforcement_army> tag setup is the same as for an <army> tag, so apart from the enclosing tag reinforcing armies are defined in the same manner as any other army. The exception is that reinforcing armies cannot themselves have reinforcing armies.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<deployables> tag

 

Child of: <army>

 

The <deployables> tag allows definition of one or more deployable items on the battlefield. There are four deployable items currently supported: caltrops, stakes, stone beds and spike traps.

 

Optional Child Tags

 

The <deployables> tag may contain the following child tag:

 

TAG

DESCRIPTION

<deployable_item>

Defines an individual deployable item. One or more of these may be defined in the parent <deployables> block.

 

 

 

 

 

 

 

<deployable_item> tag

 

Child of: <deployables>

 

The <deployable_item> tag allows declaration of an individual deployable item.

 

Attributes

 

The <deployable_item> tag supports the following attributes:

 

ATTRIBUTE

DESCRIPTION

name

This attribute is mandatory, and specifies the deployable type. Supported values are:

 

deployable_caltrop

deployable_sharp_stones

deployable_spiketrap

deployable_stakes

num_deployables

Specifies the number of deployables of the given type. Example:

 

<deployable_item name="deployable_stakes" num_deployables="2" />

 

Example

 

<deployables>

<deployable_item name="deployable_stakes" num_deployables="2" />

<deployable_item name="deployable_caltrop" num_deployables="1" />

<deployable_item name="deployable_spiketrap" num_deployables="1" />

</deployables>

 

 

 

 

 

 

 

 

 

 

 

 

 

<assault_equipment> tag

 

Child of: <army>

 

The <assault_equipment> tag allows declaration of any assault equipment the army brings to the battle. This is principally useful for giving an attacking army siege equipment such as rams and ladders to assault a settlement with.

 

Optional Child Tags

 

The <assault_equipment> tag may contain the following child tag:

 

TAG

DESCRIPTION

<assault_equipment_item>

Defines an individual item of assault equipment. One or more of these may be defined in the parent <assault_equipment> block.

 

 

 

 

 

 

 

 

<assault_equipment_item> tag

 

Child of: <assault_equipment>

 

The <assault_equipment_item> tag allows declaration of an individual item of assault equipment.

 

Attributes

 

The <assault_equipment_item> tag supports a single attribute, which is mandatory:

 

ATTRIBUTE

DESCRIPTION

equipment_name

Specifies the equipment to use. The value given must be a key in the battlefield_siege_vehicles table. Example:

 

<assault_equipment_item equipment_name="battering_ram_medium">

<!-- rest of declaration -->

</assault_equipment_item>

 

Optional Child Tags

 

The <assault_equipment_item> tag may contain the following child tags:

 

TAG

DESCRIPTION

<position>

Defines the equipment position. If no position is specified the game will choose an appropriate position. The co-ordinates must be given as "x" and "y" attributes of the position tag, as follows:

 

<position x="-246.34" y="451.76" />

<orientation>

Defines the equipment orientation. The orientation is specified in radians, with north being 0. It must be given as a "radians" attributes of the orientation tag, as follows:

 

<orientation radians="1.54" />

 

Example

 

<assault_equipment>

<assault_equipment_item equipment_name="battering_ram_medium">

<position x="-312.2" y="670.9" />

<orientation radians="1.54" />

</assault_equipment_item>

<assault_equipment_item equipment_name="gallery_medium">

<position x="-344.3" y="701.8" />

<orientation radians="1.54" />

</assault_equipment_item>

</assault_equipment>

 

 

 

 

 

 

 

 

 

 

 

 

 

<deployment_area> tag

 

Child of: <army>

 

The <deployment_area> tag allows definition of the areas of the battlefield in which the subject army may deploy at the start of the battle. It is required that each army has a deployment area, but as deployment areas are often declared in the map data it is not always necessary to define deployment areas in the battle definition xml. If the map being used contains no deployment areas, or if they're in the wrong place, then deployment areas will need to be defined here.

 

There are three methods of declaring a deployment area, which are documented below. All deployment areas, however, support the following optional tag:

 

TAG

DESCRIPTION

<orientation>

Defines the facing of the deployment area, which helps inform the AI which direction to face its units at the start of battle. The orientation is specified in radians, with 0 pointing north, and is given as a "radians" attribute of the orientation tag as follows:

 

<orientation radians="1.57" />

 

 

 

 

 

Height, Width and Centrepoint

 

The most basic method of defining a deployment area allows the content creator to define an area by setting a centrepoint, height and width. It requires the following child tags:

 

TAG

DESCRIPTION

<centre>

Defines the central position of the deployment area. The x and y co-ordinates of the position are given as "x" and "y" attributes of the tag, as follows:

 

<centre x="-357.0" y="454.5" />

<width>

Defines the width of the deployment area in metres. The deployment area width is its size in the x-axis of the map i.e. east to west. The width value is given as an attribute "metres" of the width tag, as follows:

 

<width metres="350" />

<height>

Defines the height of the deployment area in metres. The deployment area height is its size in the y-axis of the map i.e. north to south. The height value is given as an attribute "metres" of the height tag, as follows:

 

<height metres="350" />

 

Example deployment area declaration featuring height and width:

 

<deployment_area>

<centre x="0.00" y="-368.00" />

<width metres="832.00" />

<height metres="352.00" />

<orientation radians="0.00" />

</deployment_area>

 

 

Positions

 

The second method allows the content creator to define a series of co-ordinate points which enclose the deployment area. The points are connected in order of declaration to create the deployment area. The shape can be of arbitrary complexity, but the line drawn by connected the points cannot cross over itself.

 

TAG

DESCRIPTION

<position>

Defines a position in the outline of the deployment area. The x and y co-ordinates of the position are given as "x" and "y" attributes of the position tag, as follows:

 

<position x="280.0" y="200.0" />

 

Example deployment area declaration featuring positions:

 

<deployment_area>

<position x="-900" y="-900"/>

<position x="-900" y="900"/>

<position x="900" y="900"/>

<position x="900" y="-900"/>

<orientation radians="0.00"/>

</deployment_area>

 

 

 

 

Boundaries

 

The third method of defining deployment areas allows the content creator to define one or more boundaries which form the deployment area. Boundaries define areas themselves, and boundaries can be add their area to or subtract their area from the total deployment area. Using the boundary method allows definition of shapes that wouldn't be possible any other way, such as a deployment area with a hollow centre or a deployment area made of two separate, unjoined areas. Boundaries are also the only method of defining guerrilla exclusion areas. The boundaries themselves are defined as a series of positions.

 

If the deployment area is set up using boundaries, then the <deployment_area> tag should contain one or more boundary tags.

 

TAG

DESCRIPTION

<boundary>

Defines a boundary making up the deployment zone.

 

 

 

 

 

 

 

<boundary> tag

 

Child of: <deployment_area>

 

The <boundary> tag allows definition of a boundary area. One or more boundary areas can form the definition of a deployment area.

 

A boundary area can support the following attribute:

 

ATTRIBUTE

DESCRIPTION

type

Optionally defines the boundary type. Supported types are:

 

standard additive

The default type - defines this as an area in which the army can deploy.

 

standard subtractive

Subtracts this area from the total area already defined. This is used to make a hole in a deployment area (for example if a deployment area should entirely ring a settlement).

 

guerrilla exclusion additive

Guerrilla units can be deployed outside of any deployment area, but it's possible to designate areas where guerrilla units cannot deploy with a guerrilla exclusion area.

 

guerrilla exclusion subtractive

Subtracts an area from the total guerrilla exclusion area already defined.

 

Example:

 

<boundary type="standard subtractive">

<!-- boundary definition -->

</boundary>

 

Mandatory Child Tags

 

The area enclosed by the boundary is defined by a series of positions. The points are connected in order of declaration to create the boundary area.

 

TAG

DESCRIPTION

<position>

Defines a position in the outline of the boundary area. The x and y co-ordinates of the position are given as "x" and "y" attributes of the position tag, as follows:

 

<position x="165.0" y="-378.0" />

 

Example deployment area declaration featuring boundaries:

 

<deployment_area>

<boundary type="standard additive">

<position x="-900.0" y="-900.0" />

<position x="-900.0" y="900.0" />

<position x="900.0" y="900.0" />

<position x="900.0" y="-900.0" />

</boundary>

 

<boundary type="standard subtractive">

<position x="-380" y="300" />

<position x="220" y="300" />

<position x="220" y="-300" />

<position x="-380" y="-300" />

</boundary>

<orientation radians="0.00"/>

</deployment_area>