Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Difference between revisions of "Export descr unit.txt"

From TWC Wiki
Jump to navigationJump to search
(Description)
m (+dsp)
 
(29 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
{{DISPLAYTITLE:export_descr_unit.txt}}
 
=Description=
 
=Description=
The "export_descr_unit.txt", often reffered to by modders as the EDU, is an important text file in Rome: Total War and it's 2 expansions (Alexander and Barbarian invasion) and also in Medieval 2: Total War. The file controls what characteristics and stats a combat unit has, it also determines what model-texture set the unit uses. The file can be found in the data folder of the game's directory (for Medieval 2: Total War the game must be unpacked using the unpacker provided with patch 1.1, otherwise you will be unable to access the file). The file, like all ".txt" files can be opened with notepad. A standard entry in the file looks somewhat like this:
+
The "export_descr_unit.txt", often reffered to by modders as the EDU, is an important text file in [[Rome: Total War]] and it's 2 expansions ([[Alexander]] and [[Barbarian Invasion]]) and also in [[Medieval 2: Total War]]. The file controls what characteristics and stats a combat unit has, it also determines what model-texture set the unit uses. The file can be found in the data folder of the game's directory (for Medieval 2: Total War the game must be unpacked using the unpacker provided with patch 1.1, otherwise you will be unable to access the file). The file, like all ".txt" files can be opened with notepad. A standard entry in the file looks somewhat like this:
 +
 
 +
 
 +
''Note all quoted sections are from M2TW - RTW is slightly different, for instance eras and info pic lines are not included in RTW''
 +
 
 +
 
 +
:type            Longbowmen
 +
:dictionary      Longbowmen      Longbowmen
 +
:category        infantry
 +
:class            missile
 +
:voice_type      Light
 +
:banner faction  main_missile
 +
:banner holy      crusade
 +
:soldier          Longbowmen, 60, 0, 0.8
 +
:attributes      sea_faring, hide_forest, can_withdraw, stakes, stakes
 +
:formation        1.2, 1.2, 2.4, 2.4, 4, square
 +
:stat_health      1, 0
 +
:stat_pri        6, 1, arrow, 160, 30, missile, missile_mechanical, piercing, none, 25, 1
 +
:stat_pri_ex      0, 0, 0
 +
:stat_pri_attr    ap
 +
:stat_sec        7, 2, no, 0, 0, melee, melee_blade, blunt, mace, 25, 1.2
 +
:stat_sec_ex      0, 0, 0
 +
:stat_sec_attr    ap
 +
:stat_pri_armour  0, 1, 3, flesh
 +
:stat_armour_ex  0, 4, 5, 0, 1, 3, 3, flesh
 +
:stat_sec_armour  0, 0, flesh
 +
:stat_heat        2
 +
:stat_ground      1, -2, 3, 2
 +
:stat_mental      3, normal, untrained
 +
:stat_charge_dist 30
 +
:stat_fire_delay  0
 +
:stat_food        60, 300
 +
:stat_cost        0, 560, 150, 65, 50, 560, 4, 140
 +
:armour_ug_levels 0, 1, 2
 +
:armour_ug_models Longbowmen, Longbowmen_ug1, Longbowmen_ug2
 +
:ownership        england, slave
 +
:era 1            england
 +
:era 2            england
 +
:unit_info        7, 6, 4
 +
 
 +
 
  
type            Longbowmen
 
dictionary      Longbowmen      ; Longbowmen
 
category        infantry
 
class            missile
 
voice_type      Light
 
banner faction  main_missile
 
banner holy      crusade
 
soldier          Longbowmen, 48, 0, 0.8
 
attributes      sea_faring, hide_forest, can_withdraw, stakes, stakes
 
formation        1.2, 1.2, 2.4, 2.4, 4, square
 
stat_health      1, 0
 
stat_pri        6, 1, arrow, 160, 30, missile, missile_mechanical, piercing, none, 25, 1
 
;stat_pri_ex      0, 0, 0
 
stat_pri_attr    ap
 
stat_sec        7, 2, no, 0, 0, melee, melee_blade, blunt, mace, 25, 1.2
 
;stat_sec_ex      0, 0, 0
 
stat_sec_attr    ap
 
stat_pri_armour  0, 1, 3, flesh
 
;stat_armour_ex  0, 4, 5, 0, 1, 3, 3, flesh
 
stat_sec_armour  0, 0, flesh
 
stat_heat        2
 
stat_ground      1, -2, 3, 2
 
stat_mental      3, normal, untrained
 
stat_charge_dist 30
 
stat_fire_delay  0
 
stat_food        60, 300
 
stat_cost        1, 560, 150, 65, 50, 560, 4, 140
 
armour_ug_levels 0, 1, 2
 
armour_ug_models Longbowmen, Longbowmen_ug1, Longbowmen_ug2
 
ownership        england, slave
 
era 1            england
 
era 2            england
 
;unit_info        7, 6, 4
 
  
 
It looks in-comprehensible at first, but at the top of the file is a section explaining it and what each line etc. means. I've copied it here for simplicity's sake, it explains things better than I could.
 
It looks in-comprehensible at first, but at the top of the file is a section explaining it and what each line etc. means. I've copied it here for simplicity's sake, it explains things better than I could.
  
;Data entries are as follows
+
''The quoted sections are from M2TW - RTW is slightly different, for instance eras and info pic lines are not included in RTW''
; Type          The internal name of the unit. Note this not necessarily the same as the on screen name
+
 
; dictionary        The tag used to look up the on screen name
+
 
;
+
Type          The internal name of the unit. Note this not necessarily the same as the on screen name
;Category and class define the rough type of the unit. They're used for setting some default attributes and for
+
dictionary        The tag used to look up the on screen name
;determining where units go in formation amongst other things such as tags to support AI army formation
+
Category and class define the rough type of the unit. They're used for setting some default attributes and for
; category      infantry, cavalry, siege, handler, ship or non_combatant
+
determining where units go in formation amongst other things such as tags to support AI army formation
; class        light, heavy, missile or spearmen
+
category      infantry, cavalry, siege, handler, ship or non_combatant
;
+
class        light, heavy, missile or spearmen
; voice_type    Used to determine the type of voice used by the unit
+
voice_type    Used to determine the type of voice used by the unit
;
+
soldier      Name of the soldier model to use (from descr_models_battle.txt)
; soldier      Name of the soldier model to use (from descr_models_battle.txt)
+
              followed by the number of ordinary soldiers in the unit
;              followed by the number of ordinary soldiers in the unit
+
              followed by the number of extras (pigs dogs, elephants, chariots artillery pieces etc attached to the unit)
;              followed by the number of extras (pigs dogs, elephants, chariots artillery pieces etc attached to the unit)
+
              followed by the collision mass of the men. 1.0 is normal. [Only applies to infantry]
;              followed by the collision mass of the men. 1.0 is normal. [Only applies to infantry]
+
officer      Name of officer model. There may be up to 0-3 officer lines per unit
; officer      Name of officer model. There may be up to 0-3 officer lines per unit
+
ship          Type of ship used if applicable
; ship          Type of ship used if applicable
+
engine        Type of siege engine used by unit
; engine        Type of siege engine used by unit
+
animal        The type of (non ridden) animals used by the unit
; animal        The type of (non ridden) animals used by the unit
+
mount        Type of animal or vehicle ridden on
; mount        Type of animal or vehicle ridden on
+
mount_effect  Factors to add when in combat against enemy units that have the specified mounts
;
+
              Up to three factors may be specified, which may be classes of mount, or specific types
; mount_effect  Factors to add when in combat against enemy units that have the specified mounts
+
attributes    A miscellanious list of attributes and abilities the unit may have. Including
;              Up to three factors may be specified, which may be classes of mount, or specific types
+
              sea_faring = can board ships; can_swim = can swim across rivers
;
+
              hide_forest, hide_improved_forest, hide_anywhere  = defines where the unit can hide
; attributes    A miscellanious list of attributes and abilities the unit may have. Including
+
              can_sap = Can dig tunnels under walls
;              sea_faring = can board ships; can_swim = can swim across rivers
+
              frighten_foot, frighten_mounted = Cause fear to certain nearby unit types
;              hide_forest, hide_improved_forest, hide_anywhere  = defines where the unit can hide
+
              can_run_amok = Unit may go out of control when riders lose control of animals
;              can_sap = Can dig tunnels under walls
+
              general_unit = The unit can be used for a named character's bodyguard
;              frighten_foot, frighten_mounted = Cause fear to certain nearby unit types
+
              cantabrian_circle = The unit has this special ability
;              can_run_amok = Unit may go out of control when riders lose control of animals
+
              no_custom = The unit may not be selected in custom battles
;              general_unit = The unit can be used for a named character's bodyguard
+
              command = The unit carries a legionary eagle, and gives bonuses to nearby units
;              cantabrian_circle = The unit has this special ability
+
              mercenary_unit = The unit is s mercenary unit available to all factions
;              no_custom = The unit may not be selected in custom battles
+
              is_peasant = unknown
;              command = The unit carries a legionary eagle, and gives bonuses to nearby units
+
              druid = Can do a special morale raising chant
;              mercenary_unit = The unit is s mercenary unit available to all factions
+
              power_charge = unkown
;              is_peasant = unknown
+
              free_upkeep_unit = Unit can be supported free in a city
;              druid = Can do a special morale raising chant
+
formation    soldier spacing (in metres) side to side, then front to back for close formation
;              power_charge = unkown
+
              followed by the same measurements in loose formation.
;              free_upkeep_unit = Unit can be supported free in a city
+
              followed by the default number of ranks for the unit
;
+
              followed by the formations possible for the unit. One or two of
; formation    soldier spacing (in metres) side to side, then front to back for close formation
+
              square, horde, schiltrom, shield_wall, phalanx, testudo, or wedge
;              followed by the same measurements in loose formation.
+
stat_health  Hit points of man, followed by hit points of mount or attached animal (if applicable)
;              followed by the default number of ranks for the unit
+
              Ridden horses and camels do not have separate hit points  
;              followed by the formations possible for the unit. One or two of
+
Details of unit's primary weapon. If the unit has a missile weapon it must be the primary
;              square, horde, schiltrom, shield_wall, phalanx, testudo, or wedge
+
stat_pri      From left to right
;
+
              attack factor
; stat_health  Hit points of man, followed by hit points of mount or attached animal (if applicable)
+
              attack bonus factor if charging
;              Ridden horses and camels do not have separate hit points
+
              missile type fired (no if not a missile weapon type)
;
+
              range of missile
;Details of unit's primary weapon. If the unit has a missile weapon it must be the primary
+
              amount of missile ammunition per man
; stat_pri      From left to right
+
              Weapon type = melee, thrown, missile, or siege_missile
;              attack factor
+
              Tech type = simple, other, blade, archery or siege
;              attack bonus factor if charging
+
              Damage type = piercing, blunt, slashing or fire. (I don't think this is used anymore)
;              missile type fired (no if not a missile weapon type)
+
              Sound type when weapon hits = none, knife, mace, axe, sword, or spear
;              range of missile
+
              Optional. Name of effect to play when weapon fires
;              amount of missile ammunition per man
+
              Min delay between attacks (in 1/10th of a second)
;              Weapon type = melee, thrown, missile, or siege_missile
+
              Skeleton compensation factor in melee. Should be 1
;              Tech type = simple, other, blade, archery or siege
+
stat_pri_ex  Optional. attack bonus vs mounted, defence bonus vs mounted, armour penetration
;              Damage type = piercing, blunt, slashing or fire. (I don't think this is used anymore)
+
stat_pri_attr
;              Sound type when weapon hits = none, knife, mace, axe, sword, or spear
+
              primary weapon attributes any or all of
;              Optional. Name of effect to play when weapon fires
+
                  ap = armour piercing. Only counts half of target's armour
;              Min delay between attacks (in 1/10th of a second)
+
                  bp = body piercing. Missile can pass through men and hit those behind
;              Skeleton compensation factor in melee. Should be 1
+
                  spear = Used for long spears. Gives bonuses fighting cavalry, and penalties against infantry
; stat_pri_ex  Optional. attack bonus vs mounted, defence bonus vs mounted, armour penetration
+
                  long_pike = Use very long pikes. Phalanx capable units only
; stat_pri_attr
+
                  short_pike = Use shorter than normal spears.
;              primary weapon attributes any or all of
+
                  prec = Missile weapon is only thrown/ fired just before charging into combat
;                  ap = armour piercing. Only counts half of target's armour
+
                  thrown = The missile type if thrown rather than fired
;                  bp = body piercing. Missile can pass through men and hit those behind
+
                  launching = attack may throw target men into the air
;                  spear = Used for long spears. Gives bonuses fighting cavalry, and penalties against infantry
+
                  area = attack affects an area, not just one man
;                  long_pike = Use very long pikes. Phalanx capable units only
+
                  spear & light_spear = The unit when braced has various protecting mechanisms versus cavalry charges from the front
;                  short_pike = Use shorter than normal spears.
+
                  spear_bonus_x = attack bonus against cavalry. x = 2, 4, 6, 8, 10 or 12
;                  prec = Missile weapon is only thrown/ fired just before charging into combat
+
Details of secondary weapons. If the unit rides on, or has attached animals or vehicles
;                  thrown = The missile type if thrown rather than fired
+
then the secondary weapon details refer to their attacks. If the unit has missile weapons
;                  launching = attack may throw target men into the air
+
the secondary weapon will be the one used for melee
;                  area = attack affects an area, not just one man
+
If the unit has a primary melee weapon, it may have a secondary side arm
;                  spear & light_spear = The unit when braced has various protecting mechanisms versus cavalry charges from the front
+
stat_sec      As per stat_pri    (a value of no means no secondary weapon)
;                  spear_bonus_x = attack bonus against cavalry. x = 2, 4, 6, 8, 10 or 12
+
stat_sec_ex  as per stat_pri_ex
;
+
stat_sec_attr As per stat_pri_attr
;Details of secondary weapons. If the unit rides on, or has attached animals or vehicles
+
stat_ter      As per stat_pri If there is no ternary weapon, then there are no ternary data entries
;then the secondary weapon details refer to their attacks. If the unit has missile weapons
+
stat_ter_ex  as per stat_pri_ex
;the secondary weapon will be the one used for melee
+
stat_ter_attr As per stat_pri_attr
;If the unit has a primary melee weapon, it may have a secondary side arm
+
stat_pri_armour  Details of the man's defences
; stat_sec      As per stat_pri    (a value of no means no secondary weapon)
+
                  armour factor
; stat_sec_ex  as per stat_pri_ex
+
                  defensive skill factor (not used when shot at)
; stat_sec_attr As per stat_pri_attr
+
                  shield factor (only used for attacks from the front of left)
; stat_ter      As per stat_pri If there is no ternary weapon, then there are no ternary data entries
+
                  sound type when hit = flesh, leather, or metal
; stat_ter_ex  as per stat_pri_ex
+
stat_armour_ex    Details of the man's defences
; stat_ter_attr As per stat_pri_attr
+
                  armour factor. 4 values. First for base value, then 3 upgrade levels
;
+
                  defensive skill factor (not used when shot at)
; stat_pri_armour  Details of the man's defences
+
                  shield factors. First for melee, second for missile fire
;                  armour factor
+
                  sound type when hit = flesh, leather, or metal
;                  defensive skill factor (not used when shot at)
+
stat_sec_armour  Details of animal's or vehicle's defenses (note riden horses do not have a separate defence)
;                  shield factor (only used for attacks from the front of left)
+
                  As per stat_pri_armour, except that the shield entry is ommited
;                  sound type when hit = flesh, leather, or metal
+
stat_heat        Extra fatigue suffered by the unit in hot climates
; stat_armour_ex    Details of the man's defences
+
stat_ground      Combat modifiers on different ground types. From left to right
;                  armour factor. 4 values. First for base value, then 3 upgrade levels
+
                  scrub, sand, forest, snow
;                  defensive skill factor (not used when shot at)
+
stat_mental      The base morale level, followed by discipline and training
;                  shield factors. First for melee, second for missile fire
+
                  discipline may be normal, low, disciplined or impetuous. Impetuous units may charge without orders
;                  sound type when hit = flesh, leather, or metal
+
                  training determines how tidy the unit's formation is. Discipline the response to morale SHOCKS
;
+
                  optional lock_morale stops unit from ever routing
; stat_sec_armour  Details of animal's or vehicle's defenses (note riden horses do not have a separate defence)
+
stat_charge_distance Distance from the enemy that the unit will begin charging
;                  As per stat_pri_armour, except that the shield entry is ommited
+
stat_fire_delay  Extra delay over that imposed by animation, hetween volleys
;
+
stat_food        No longer used
; stat_heat        Extra fatigue suffered by the unit in hot climates
+
stat_cost        Number of turns to build,
;
+
                  Cost of unit to construct
; stat_ground      Combat modifiers on different ground types. From left to right
+
                  Cost of upkeep
;                  scrub, sand, forest, snow
+
                  Cost of upgrading weapons
; stat_mental      The base morale level, followed by discipline and training
+
                  Cost of upgrading armour
;                  discipline may be normal, low, disciplined or impetuous. Impetuous units may charge without orders
+
                  Cost for custom battles
;                  training determines how tidy the unit's formation is. Discipline the response to morale SHOCKS
+
stat_stl          Number of soldiers needed for unit to count as alive
;                  optional lock_morale stops unit from ever routing
+
armour_ug_levels  Smith level needed for each armour upgrade
;
+
armour_ug_models  Body for each upgrade level
; stat_charge_distance Distance from the enemy that the unit will begin charging
+
stat_ownership    List of factions and cultures that may have this unit
; stat_fire_delay  Extra delay over that imposed by animation, hetween volleys
+
era 0,            Optional List of factions that use this in multiplayer era 0
;
+
era 1,            Optional List of factions that use this in multiplayer era 1
; stat_food        No longer used
+
era 2,            Optional List of factions that use this in multiplayer era 2
; stat_cost        Number of turns to build,
+
info_pic_dir      Optional. Dir to find the info pic in (instead of faction dir)
;                  Cost of unit to construct
+
card_pic_dir      Optional. Dir to find the unit card in (instead of faction dir)
;                  Cost of upkeep
+
unit_info        Info for unit info panel. Melee attack, missile attack, defence
;                  Cost of upgrading weapons
 
;                  Cost of upgrading armour
 
;                  Cost for custom battles
 
; stat_stl          Number of soldiers needed for unit to count as alive
 
; armour_ug_levels  Smith level needed for each armour upgrade
 
; armour_ug_models  Body for each upgrade level
 
; stat_ownership    List of factions and cultures that may have this unit
 
; era 0,            Optional List of factions that use this in multiplayer era 0
 
; era 1,            Optional List of factions that use this in multiplayer era 1
 
; era 2,            Optional List of factions that use this in multiplayer era 2
 
; info_pic_dir      Optional. Dir to find the info pic in (instead of faction dir)
 
; card_pic_dir      Optional. Dir to find the unit card in (instead of faction dir)
 
; unit_info        Info for unit info panel. Melee attack, missile attack, defence
 
  
 
=Format=
 
=Format=
 +
The export_descr_unit.txt file is a ".txt" file, can be opened using Notepad.
 +
 +
 +
==External Links==
 +
See also [https://www.twcenter.net/forums/showthread.php?t=111344 The Complete EDU Guide] - Guide to EDU for RTW
 +
 +
==Note==
 +
Not every possibilities are used up in TW games. Some new features are present but not used in any ways. There are some unsued lines in M2TW export_decr_units.txt like info_pic_dir, card_pic_dir, 'someting'_ex lines.
 +
Also there is a large undocumentation in the .txt about new features and costants.
 +
There is a completely undocumented line, namely : mounted_engine.
 +
Also the list of missiletypes, attributes and such documented in .txt is not even the half of the available possibilities in M2TW.
 +
 +
Available 'attributes' in M2TW:Kingdoms are :
 +
:sea_faring               
 +
:can_withdraw       
 +
:mercenary_unit
 +
:hide_forest               
 +
:can_formed_charge
 +
:knight
 +
:free_upkeep_unit         
 +
:cantabrian_circle         
 +
:cannot_skirmish
 +
:hardy                     
 +
:general_unit
 +
:general_unit_upgrade
 +
:gunpowder_unit
 +
:start_not_skirmishing
 +
:guncavalry
 +
:crossbow
 +
:no_custom                 
 +
:stakes                   
 +
:hide_improved_forest
 +
:very_hardy               
 +
:fire_by_rank
 +
:gunmen
 +
:is_peasant
 +
:peasant
 +
:pike
 +
:hide_anywhere
 +
:frighten_mounted
 +
:can_run_amok
 +
:frighten_foot
 +
:incendiary
 +
:druid
 +
:artillery
 +
:cannon
 +
:rocket
 +
:mortar
 +
:explode
 +
:standard
 +
:wagon_fort
 +
 +
Available attack attributes(stat_pri/sec/ter_attr) in M2TW:Kingdoms are :
 +
:no             
 +
:ap             
 +
:thrown         
 +
:light_spear
 +
:spear_bonus_4
 +
:spear
 +
:spear_bonus_8
 +
:long_pike
 +
:bp             
 +
:launching
 +
:area           
 +
 +
Available Attack tech_types in M2TW:Kingdoms are :
 +
:melee_simple
 +
:melee_blade
 +
:missile_mechanical
 +
:artillery_mechanical
 +
:artillery_gunpowder
 +
:missile_gunpowder
 +
 +
The last two numbers in Cost mean, when choosing an army for a custom battle :
 +
:How many of this unit you can have in your army before the icon turns red. Each additional unit after this has an increased cost, and increases the cost of adding another such unit.
 +
:How much the cost is increased by for each additional unit after you reach a limit, which is usurally four units for normal soldiers, and one unit for general's bodyguard.
 +
 +
[[Category:M2TW Modding]]

Latest revision as of 04:06, 11 March 2023

Description

The "export_descr_unit.txt", often reffered to by modders as the EDU, is an important text file in Rome: Total War and it's 2 expansions (Alexander and Barbarian Invasion) and also in Medieval 2: Total War. The file controls what characteristics and stats a combat unit has, it also determines what model-texture set the unit uses. The file can be found in the data folder of the game's directory (for Medieval 2: Total War the game must be unpacked using the unpacker provided with patch 1.1, otherwise you will be unable to access the file). The file, like all ".txt" files can be opened with notepad. A standard entry in the file looks somewhat like this:


Note all quoted sections are from M2TW - RTW is slightly different, for instance eras and info pic lines are not included in RTW


type Longbowmen
dictionary Longbowmen Longbowmen
category infantry
class missile
voice_type Light
banner faction main_missile
banner holy crusade
soldier Longbowmen, 60, 0, 0.8
attributes sea_faring, hide_forest, can_withdraw, stakes, stakes
formation 1.2, 1.2, 2.4, 2.4, 4, square
stat_health 1, 0
stat_pri 6, 1, arrow, 160, 30, missile, missile_mechanical, piercing, none, 25, 1
stat_pri_ex 0, 0, 0
stat_pri_attr ap
stat_sec 7, 2, no, 0, 0, melee, melee_blade, blunt, mace, 25, 1.2
stat_sec_ex 0, 0, 0
stat_sec_attr ap
stat_pri_armour 0, 1, 3, flesh
stat_armour_ex 0, 4, 5, 0, 1, 3, 3, flesh
stat_sec_armour 0, 0, flesh
stat_heat 2
stat_ground 1, -2, 3, 2
stat_mental 3, normal, untrained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 0, 560, 150, 65, 50, 560, 4, 140
armour_ug_levels 0, 1, 2
armour_ug_models Longbowmen, Longbowmen_ug1, Longbowmen_ug2
ownership england, slave
era 1 england
era 2 england
unit_info 7, 6, 4



It looks in-comprehensible at first, but at the top of the file is a section explaining it and what each line etc. means. I've copied it here for simplicity's sake, it explains things better than I could.

The quoted sections are from M2TW - RTW is slightly different, for instance eras and info pic lines are not included in RTW


Type          The internal name of the unit. Note this not necessarily the same as the on screen name
dictionary        The tag used to look up the on screen name

Category and class define the rough type of the unit. They're used for setting some default attributes and for determining where units go in formation amongst other things such as tags to support AI army formation

category      infantry, cavalry, siege, handler, ship or non_combatant
class         light, heavy, missile or spearmen
voice_type    Used to determine the type of voice used by the unit
soldier       Name of the soldier model to use (from descr_models_battle.txt)
              followed by the number of ordinary soldiers in the unit
              followed by the number of extras (pigs dogs, elephants, chariots artillery pieces etc attached to the unit)
              followed by the collision mass of the men. 1.0 is normal. [Only applies to infantry]
officer       Name of officer model. There may be up to 0-3 officer lines per unit
ship          Type of ship used if applicable
engine        Type of siege engine used by unit
animal        The type of (non ridden) animals used by the unit
mount         Type of animal or vehicle ridden on
mount_effect  Factors to add when in combat against enemy units that have the specified mounts
              Up to three factors may be specified, which may be classes of mount, or specific types
attributes    A miscellanious list of attributes and abilities the unit may have. Including
              sea_faring = can board ships; can_swim = can swim across rivers
              hide_forest, hide_improved_forest, hide_anywhere   = defines where the unit can hide
              can_sap = Can dig tunnels under walls
              frighten_foot, frighten_mounted = Cause fear to certain nearby unit types
              can_run_amok = Unit may go out of control when riders lose control of animals
              general_unit = The unit can be used for a named character's bodyguard
              cantabrian_circle = The unit has this special ability
              no_custom = The unit may not be selected in custom battles
              command = The unit carries a legionary eagle, and gives bonuses to nearby units
              mercenary_unit = The unit is s mercenary unit available to all factions
              is_peasant = unknown
              druid = Can do a special morale raising chant
              power_charge = unkown
              free_upkeep_unit = Unit can be supported free in a city
formation     soldier spacing (in metres) side to side, then front to back for close formation
              followed by the same measurements in loose formation.
              followed by the default number of ranks for the unit
              followed by the formations possible for the unit. One or two of
              square, horde, schiltrom, shield_wall, phalanx, testudo, or wedge
stat_health   Hit points of man, followed by hit points of mount or attached animal (if applicable)
              Ridden horses and camels do not have separate hit points 

Details of unit's primary weapon. If the unit has a missile weapon it must be the primary

stat_pri      From left to right
              attack factor
              attack bonus factor if charging
              missile type fired (no if not a missile weapon type)
              range of missile
              amount of missile ammunition per man
              Weapon type = melee, thrown, missile, or siege_missile
              Tech type = simple, other, blade, archery or siege
              Damage type = piercing, blunt, slashing or fire. (I don't think this is used anymore)
              Sound type when weapon hits = none, knife, mace, axe, sword, or spear
              Optional. Name of effect to play when weapon fires
              Min delay between attacks (in 1/10th of a second)
              Skeleton compensation factor in melee. Should be 1
stat_pri_ex   Optional. attack bonus vs mounted, defence bonus vs mounted, armour penetration
stat_pri_attr
              primary weapon attributes any or all of
                  ap = armour piercing. Only counts half of target's armour
                  bp = body piercing. Missile can pass through men and hit those behind
                  spear = Used for long spears. Gives bonuses fighting cavalry, and penalties against infantry
                  long_pike = Use very long pikes. Phalanx capable units only
                  short_pike = Use shorter than normal spears.
                  prec = Missile weapon is only thrown/ fired just before charging into combat
                  thrown = The missile type if thrown rather than fired
                  launching = attack may throw target men into the air
                  area = attack affects an area, not just one man
                  spear & light_spear = The unit when braced has various protecting mechanisms versus cavalry charges from the front
                  spear_bonus_x = attack bonus against cavalry. x = 2, 4, 6, 8, 10 or 12

Details of secondary weapons. If the unit rides on, or has attached animals or vehicles then the secondary weapon details refer to their attacks. If the unit has missile weapons the secondary weapon will be the one used for melee If the unit has a primary melee weapon, it may have a secondary side arm

stat_sec      As per stat_pri     (a value of no means no secondary weapon)
stat_sec_ex   as per stat_pri_ex
stat_sec_attr As per stat_pri_attr
stat_ter      As per stat_pri If there is no ternary weapon, then there are no ternary data entries
stat_ter_ex   as per stat_pri_ex
stat_ter_attr As per stat_pri_attr
stat_pri_armour   Details of the man's defences
                  armour factor
                  defensive skill factor (not used when shot at)
                  shield factor (only used for attacks from the front of left)
                  sound type when hit = flesh, leather, or metal
stat_armour_ex    Details of the man's defences
                  armour factor. 4 values. First for base value, then 3 upgrade levels
                  defensive skill factor (not used when shot at)
                  shield factors. First for melee, second for missile fire
                  sound type when hit = flesh, leather, or metal
stat_sec_armour   Details of animal's or vehicle's defenses (note riden horses do not have a separate defence)
                  As per stat_pri_armour, except that the shield entry is ommited
stat_heat         Extra fatigue suffered by the unit in hot climates
stat_ground       Combat modifiers on different ground types. From left to right
                  scrub, sand, forest, snow
stat_mental       The base morale level, followed by discipline and training
                  discipline may be normal, low, disciplined or impetuous. Impetuous units may charge without orders
                  training determines how tidy the unit's formation is. Discipline the response to morale SHOCKS
                  optional lock_morale stops unit from ever routing
stat_charge_distance Distance from the enemy that the unit will begin charging
stat_fire_delay   Extra delay over that imposed by animation, hetween volleys
stat_food         No longer used
stat_cost         Number of turns to build,
                  Cost of unit to construct
                  Cost of upkeep
                  Cost of upgrading weapons
                  Cost of upgrading armour
                  Cost for custom battles
stat_stl          Number of soldiers needed for unit to count as alive
armour_ug_levels  Smith level needed for each armour upgrade
armour_ug_models  Body for each upgrade level
stat_ownership    List of factions and cultures that may have this unit
era 0,            Optional List of factions that use this in multiplayer era 0
era 1,            Optional List of factions that use this in multiplayer era 1
era 2,            Optional List of factions that use this in multiplayer era 2
info_pic_dir      Optional. Dir to find the info pic in (instead of faction dir)
card_pic_dir      Optional. Dir to find the unit card in (instead of faction dir)
unit_info         Info for unit info panel. Melee attack, missile attack, defence

Format

The export_descr_unit.txt file is a ".txt" file, can be opened using Notepad.


External Links

See also The Complete EDU Guide - Guide to EDU for RTW

Note

Not every possibilities are used up in TW games. Some new features are present but not used in any ways. There are some unsued lines in M2TW export_decr_units.txt like info_pic_dir, card_pic_dir, 'someting'_ex lines. Also there is a large undocumentation in the .txt about new features and costants. There is a completely undocumented line, namely : mounted_engine. Also the list of missiletypes, attributes and such documented in .txt is not even the half of the available possibilities in M2TW.

Available 'attributes' in M2TW:Kingdoms are :

sea_faring
can_withdraw
mercenary_unit
hide_forest
can_formed_charge
knight
free_upkeep_unit
cantabrian_circle
cannot_skirmish
hardy
general_unit
general_unit_upgrade
gunpowder_unit
start_not_skirmishing
guncavalry
crossbow
no_custom
stakes
hide_improved_forest
very_hardy
fire_by_rank
gunmen
is_peasant
peasant
pike
hide_anywhere
frighten_mounted
can_run_amok
frighten_foot
incendiary
druid
artillery
cannon
rocket
mortar
explode
standard
wagon_fort

Available attack attributes(stat_pri/sec/ter_attr) in M2TW:Kingdoms are :

no
ap
thrown
light_spear
spear_bonus_4
spear
spear_bonus_8
long_pike
bp
launching
area

Available Attack tech_types in M2TW:Kingdoms are :

melee_simple
melee_blade
missile_mechanical
artillery_mechanical
artillery_gunpowder
missile_gunpowder

The last two numbers in Cost mean, when choosing an army for a custom battle :

How many of this unit you can have in your army before the icon turns red. Each additional unit after this has an increased cost, and increases the cost of adding another such unit.
How much the cost is increased by for each additional unit after you reach a limit, which is usurally four units for normal soldiers, and one unit for general's bodyguard.