TOTAL WAR WIKI

Total War: ATTILA KIT - Battle tags

Battle tags

24 April 2015

14:42

 

<battle> tag

The <battle> tag encloses information about the battle as a whole.

 

Mandatory Child Tags

 

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

 

TAG

DESCRIPTION

<alliance>

Encloses information laying out the alliances, armies and units on the battlefield. There must always be exactly two alliances defined.

<weather>

Defines the wind, weather and environment.

<battle_map_definition>

Encloses information about the battlefield to use.

 

 

Optional Child Tags

 

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

 

TAG

DESCRIPTION

<battle_description>

Encloses miscellaneous info about the battle. Scripted battle definitions commonly feature this tag as the link to any script file is placed in here.

<playable_area>

Allows a subset of the battlefield to be defined as the playable area.

<fauna_config>

Defines fauna on the battlefield (wild animals).

<civilians>

Encloses information about civilians on the battlefield.

<sea_surface_name>

Defines the sea surface to use (does not affect rivers or lakes). Available sea_surfaces are defined in the sea_surfaces table in the database. Example:

 

<sea_surface_name>wind_level_2</sea_surface_name>

 

<skip_deployment>

Game skips over the deployment phase if this tag is present. Example:

 

<skip_deployment />

<skip_results>

Game skips over the results phase if present. Example:

 

<skip_results />

<gates_open>

Any gates on the map will start open (as if the settlement had been infiltrated by a spy prior to battle). Example:

 

<gates_open />

<boiling_oil>

If the map is a siege battle, then the defender will be able to use boiling oil if this tag is present. Example:

 

<boiling_oil />

<disable_siege_defender_sees_all>

In a standard siege battle, the defender can see the entire map. If this tag is present then such behaviour is disabled. Example:

 

<disable_siege_defender_sees_all />

 

 

Example

 

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<playable_area> tag

 

Child of: <battle>

 

The <playable_area> tag allows definition of a subset of the battlefield as the playable area, limiting the combat area. The playable area must always be square, but can be smaller than the maximum size and can be offset from the centre of the full battlefield.

 

Attributes

 

The <playable_area> tag is set up with the following attributes.

 

ATTRIBUTE

DESCRIPTION

dimension

This attribute is mandatory, and defines the length of one of the sides of the playable area in metres. The full battlefield is 2000x2000 metres and the playable area must be a minimum of 50 metres smaller. Example:

 

<playable_area dimension="1900" />

centre_x / centre_y

These attributes define a centre-point for the playable area, should it be desired to be different from the centre of the battlefield. Example:

 

<playable_area dimension="1000" centre_x="100" centre_y="-100" />

 

 

 

 

 

 

 

 

 

 

 

 

<battle_description> tag

 

Child of: <battle>

 

The <battle_description> tag encloses miscellaneous additional information about the battle. It supports the following optional tags:

 

TAG

DESCRIPTION

<time_of_day>

Defines whether the battle takes place during the day or night. Valid values are "day" and "night".

 

<time_of_day>night</time_of_day>

<season>

Defines the season. Valid values are "spring", "summer", "autumn" and "winter".

 

<season>winter</season>

<precipitation_type>

Defines the type of precipitation, if any. Valid values are "dry", "fog", "rain" and "snow".

 

<precipitation_type>rain</precipitation_type>

<battle_script>

Defines a link to the battle script file, if a script is desired. If the script file is in the same directory as the definition xml then no path needs to be specified, otherwise a path from the data folder should be included. This tag also supports an optional attribute "prepare_for_fade_in" which, if set to true, starts the battle with a black screen. This is useful for opening cinematics, but requires that the script fades the camera in. Example:

 

<battle_script prepare_for_fade_in="true">

script\siege_battle\script_start.lua

</battle_script>

<next_campaign>

Specifies a campaign to run on battle completion. The supplied value should be a key to an entry in the campaigns table in the database. Example:

 

<next_campaign>test_campaign</next_campaign>

<next_campaign_faction>

Specifies the faction to start the next campaign with, if one is set. The supplied value should be a key to an entry in the factions table for a faction that is present in the specified campaign. Example:

 

<next_campaign_faction>att_fact_vandali</next_campaign_faction>

<next_battle>

Specifies another battle to load on completion of this one. The supplied value should be a key to an entry in the battles table in the database. Example:

 

<next_campaign_faction>ravenna</next_campaign_faction>

<type>

Defines the battle type. The value given must correspond to an entry in the campaign_battle_type_enums table in the database. Example:

 

<type>port_assault</type>

<duration>

Specifies a time limit for the battle, in seconds. Battles have no time limit by default.

 

<duration>3600</duration>

<timeout_winning_alliance_index>

Specifies which alliance wins the battle if the time limit runs out. Generally, this also specifies the defender of the battle. Valid values are "0" and "1". Alliances are numbered in order of declaration.

 

<timeout_winning_alliance_index>1</timeout_winning_alliance_index>

<battlefield_owner_alliance_index>

Specifies the owner of the battlefield, which can be useful to force a particular alliance to be the defender in a siege battle. Valid values are "0" and "1".

 

<battlefield_owner_alliance_index>

0

</battlefield_owner_alliance_index>

 

Example

 

<battle_description>

<battle_script prepare_for_fade_in="true">CB_Start.lua</battle_script>

<time_of_day>day</time_of_day>

<season>Summer</season>

<precipitation_type>dry</precipitation_type>

<type>naval_normal</type>

</battle_description>

 

 

 

 

 

 

 

 

 

<battle_map_definition> tag

 

Child of: <battle>

 

The <battle_map_definition> tag encloses information about what map to site the battle on.

 

Optional Child Tags

 

The <battle_map_definition> tag supports the following child tags:

 

TAG

DESCRIPTION

<name>

Defines a battle tilemap to use. The supplied value should be a path from the data folder to a battle map file. Example:

 

<name>terrain/battles/adrianople/</name>

<tile_map_position>

If the tilemap specified by the <name> tag belongs to a campaign, a position on the map can be specified by the tile_map_position tag. This is given by "x" and "y" attributes on the tile_map_position tag, as follows:

 

<name>Terrain/battles/main_attila_map/</name>

<tile_map_position x="0.2795" y="0.616" />

 

The co-ordinates given must both be unary (between 0 and 1), and specify a position proportional to the size of the map, relative to the top-left corner. Therefore a position of [0.5, 0.5] is in the dead centre of the map, and [0.25, 0.75] is mid way between the centre and the bottom-left corner. These positions can be most easily discovered by visiting the custom battle screen, and viewing the tooltip on the map image shown there.

<tile_upgrade>

Specifies an upgrade level of the chosen tile. This is useful if a map has been chosen from a campaign, but an upgraded level of the map is desired. Valid keys are as follows:

 

level2_att_cult_barbarian

level2_att_cult_eastern

level2_att_cult_roman

level2_att_sub_cult_roman_east

 

Example:

 

<tile_upgrade>

level2_att_cult_barbarian

</tile_upgrade>

 

Example

 

<battle_map_definition>

<name>Terrain/battles/main_attila_map/</name>

<tile_map_position x="0.2795" y="0.616"></tile_map_position>

<tile_upgrade>level2_att_cult_barbarian</tile_upgrade>

</battle_map_definition>

 

 

 

 

 

 

 

 

<weather> tag

 

Child of: <battle>

 

The <weather> tag encloses information about the wind and environment on the map.

 

Mandatory Child Tags

 

The <weather> tag must feature the following child tag:

 

TAG

DESCRIPTION

<prevailing_wind>

Defines the wind direction. This is specified as a co-ordinate offset, as "x" and "y" attributes of the prevailing_wind tag as follows:

 

<prevailing_wind x="1.00" y="0.00"/>

 

Optional Child Tags

 

The <weather> tag can feature the following child tags:

 

TAG

DESCRIPTION

<environment_key>

Specifies an environment file to use. This defines the look of the battle, specifying lighting, fog and more. The supplied value should be a path to an environment file from the data directory. A list of built-in environments can be found below.

 

<environment_key>

Weather\ROME_Med\default\Land\day\dry\morn_med_1.environment

</environment_key>

 

Example

 

<weather>

<environment_key>

Weather\default\default\land\night\dry\night_north1.environment

</environment_key>

<prevailing_wind x="1.00" y="1.00"/>

</weather>

 

 

 

List of Built-In Environments

 

The following is the list of general campaign environments. Additional environment files can be created but the format of the environment file (which is text-readable) is beyond the scope of this documentation.

 

Weather\default\default\land\day\dry\CC1_2_day_dry_1.environment

Weather\default\default\land\day\dry\CC1_2_day_dry_2.environment

Weather\default\default\land\day\dry\CC2_3_day_dark_3.environment

Weather\default\default\land\day\dry\CC3_day_dark_2_med.environment

Weather\default\default\land\day\dry\CC4_day_dark_1.environment

Weather\default\default\land\day\dry\CC4_day_dry_1.environment

Weather\default\default\land\day\dry\CC4_day_dry_2.environment

Weather\default\default\land\day\dry\CC4_day_dry_3.environment

Weather\default\default\land\day\dry\day_north_1.environment

Weather\default\default\land\day\dry\evening_north_1.environment

Weather\default\default\land\day\dry\evening_north_2.environment

Weather\default\default\land\day\dry\evening_north_3.environment

Weather\default\default\land\day\dry\morn_6.environment

Weather\default\default\land\day\dry\morn_north_1.environment

Weather\default\default\land\day\dry\morn_north_2.environment

Weather\default\default\land\day\dry\snow_01_light.environment

Weather\default\default\land\day\dry\snow_dry_0_light.environment

Weather\default\default\land\day\dry\snow_dry_1_light.environment

Weather\default\default\land\day\dry\snow_dry_2_light.environment

Weather\default\default\land\day\dry\snow_dry_colour.environment

Weather\default\default\land\day\dry\snow_ground.environment

Weather\default\default\land\day\dry\spring_1_dry_snow.environment

Weather\default\default\land\day\dry\spring_2_dry_snow.environment

Weather\default\default\land\day\fog\default_day_fog.environment

Weather\default\default\land\day\fog\snow_fog_ground.environment

Weather\default\default\land\day\rain\default_day_rain.environment

Weather\default\default\land\day\rain\morn_9.environment

Weather\default\default\land\day\snow\snow.environment

Weather\default\default\land\day\snow\snow_01_light.environment

Weather\default\default\land\day\snow\snow_3_heavy.environment

Weather\default\default\land\day\snow\snow_4_heavy.environment

Weather\default\default\land\day\snow\snow_5_heavy.environment

Weather\default\default\land\day\snow\spring_snow_3.environment

Weather\default\default\land\night\dry\default_night.environment

Weather\default\default\land\night\dry\night_north1.environment

Weather\default\default\land\night\dry\night_north2.environment

Weather\default\default\land\night\dry\snow_dry_night.environment

Weather\default\default\land\night\fog\default_night_fog.environment

Weather\default\default\land\night\fog\snow_night_fog.environment

Weather\default\default\land\night\rain\default_night_rain.environment

Weather\default\default\land\night\snow\default_night_snow.environment

Weather\default\default\sea\day\fog\at_day_sea_fog.environment

Weather\default\default\sea\night\fog\at_day_sea_fog.environment

Weather\default\default\sea\night\fog\at_night_sea_fog.environment

Weather\ROME_Desert\default\Land\day\dry\desert_day.environment

Weather\ROME_Desert\default\Land\day\dry\desert_evening.environment

Weather\ROME_Desert\default\Land\day\dry\desert_eveningB.environment

Weather\ROME_Desert\default\Land\day\dry\desert_morning.environment

Weather\ROME_Desert\default\Land\day\storm\default_sorm.environment

Weather\ROME_Desert\default\Land\night\dry\night_med_1.environment

Weather\ROME_Desert\default\Land\night\dry\night_med_3.environment

Weather\ROME_Desert\default\Land\night\storm\default_night_storm.environment

Weather\ROME_Destruct\default\land\day\dry\day_dark_4.environment

Weather\ROME_Destruct\default\land\day\dry\day_dark_4c.environment

Weather\ROME_Destruct\default\land\day\dry\DEMO_morning.environment

Weather\ROME_Destruct\default\land\day\dry\snow_morning.environment

Weather\ROME_Destruct\default\land\day\fog\default_day_fog.environment

Weather\ROME_Destruct\default\land\day\rain\default_day_rain.environment

Weather\ROME_Destruct\default\land\day\rain\morn_9.environment

Weather\ROME_Destruct\default\land\day\snow\snow.environment

Weather\ROME_Destruct\default\land\night\dry\night_north1.environment

Weather\ROME_Destruct\default\land\night\dry\night_north2.environment

Weather\ROME_Destruct\default\land\night\dry\snow_night_north1.environment

Weather\ROME_Destruct\default\land\night\fog\default_night_fog.environment

Weather\ROME_Destruct\default\land\night\rain\default_night_rain.environment

Weather\ROME_Destruct\default\land\night\snow\default_night_snow.environment

Weather\ROME_Med\default\Land\day\dry\day_med_1.environment

Weather\ROME_Med\default\Land\day\dry\day_med_2.environment

Weather\ROME_Med\default\Land\day\dry\day_med_3.environment

Weather\ROME_Med\default\Land\day\dry\day_med_clear.environment

Weather\ROME_Med\default\Land\day\dry\evening_med_2.environment

Weather\ROME_Med\default\Land\day\dry\evening_med_3.environment

Weather\ROME_Med\default\Land\day\dry\morn_med_1.environment

Weather\ROME_Med\default\Land\day\dry\morn_med_2.environment

Weather\ROME_Med\default\Land\day\dry\morn_med_3.environment

Weather\ROME_Med\default\Land\day\fog\default_attila.environment

Weather\ROME_Med\default\Land\day\rain\default_attila.environment

Weather\ROME_Med\default\Land\day\rain\morn_9.environment

Weather\ROME_Med\default\Land\day\snow\default_attila.environment

Weather\ROME_Med\default\Land\night\dry\evening_med_2.environment

Weather\ROME_Med\default\Land\night\dry\night_med_1.environment

Weather\ROME_Med\default\Land\night\dry\night_med_3.environment

Weather\ROME_Med\default\Sea\day\fog\med_sea_fog_attila.environment