Code:
type dunland pikemen2
= name of unit in game mechanics terms
dictionary 4a_dunland_pikemen2 ; Dunlendish Elite Pikemen
= name of unit in dictionary (where it takes it's flavour text) ; Actual name of unit in the game.
category infantry
= How the AI handles them
class spearmen
= Again, how the AI handles them. Which makes it handle gondor militia as spearmen despite them not actually having spear attribute.
voice_type Medium_1
= The voice of the unit in game.
soldier 4a_dunland_pikemen2, 60, 0, 0.46
= The graphic of the soldier, followed by the number of men in the unit in normal mode, followed by the number of extras in the unit (dogs for Dunland warhounds etc),
and last the mass of the unit (meaning how much they get pushed around)
officer 4a_dunland_standard
= Graphic for the officer
attributes sea_faring, is_peasant, hide_forest
= What abilities the unit has. This one can embark on boats, has half the effectiveness as garrison troops (almost all units in TNS has this) and can hide in forests.
formation 0.9, 1, 2, 2, 8, square, schiltrom
= How the unit forms up, the first "pair" is distance between soldiers in closed formation (0.9 and 1, meaning between soldiers side to side and between them in ranks). The second pair is the same loose formation
=The last number is how many ranks it forms up in as default. Then how the formation looks, square is default but some has horde, which is that round loose jumbled formation, Schiltrom means it can form a Schiltrom.
stat_health 1, 5
= How much health the unit has. Number of hitpoints. The first number is the soldier, which most has only 1 hitpoint and the second is hitpoints for their mounts if they are separate (like mumakils and chariots).
=In TNS they have increased the second stat since it takes this into account for auto-resolve despite not doing anything for infantry in manual combat.
stat_pri 10, 8, no, 0, 0, melee, simple, piercing, spear, 25 ,0.37
=Weapon stats for the primary weapon. First number is damage, second is charge bonus damage, type of missile fired (arrow etc, no if it's not a missile weapon, followed by range of missile and lastly number of arrows/javelins.
=Melee is the type of attack, melee, thrown etc, makes a difference if you throw weapons or fire them.
=Simple is the "tech-level" of weapons for upgrades from the forge. Simple means in TNS Iron or iron alloy. Blade is Steel and missile is what you think it is.
=Piercing is apparently an old stat and isn't used anymore.
=Spear means the sound that is played when hitting, it does not mean that it's actually a spear, just that it sounds like one.
=The number 25 is probably not used, everyone seems to have it.
=The last number is the attack speed in seconds, a fairly important stat that isn't shown anywhere in the game. Missile weapons tends to have 1 and melee 0,5. These pikemen are very effective because they attack much faster than most units.
stat_pri_attr short_pike, spear, spear_bonus_4
=Attributes that determine bonuses for the weapon. short_pike is required for schiltrom formation. Spear gives it bonus to atk vs cav and a negative vs infantry, most use light_spear instead, as stated above.
=The spear-bonus is additional bonus damage vs cavalry.
stat_sec 0, 0, no, 0, 0, no, no, no, none, 0 ,1
=Stats for a secondary weapon, if the unit has it. This one doesn't. Otherwise same numbers as for the primary weapon (missile weapons seems to only work as primary weapons).
stat_sec_attr no
= again, same as for primary weapon but of course applies to the secondary.
stat_pri_armour 11, 8, 5, leather
= defense values. First is armor, second is parry/dodge and third is shield.
= Armor always works, ap attribute (armor piercing) halves it. Parry/dodge only works in melee, not against missiles, and only from the front and possibly the right.
= Shield doubles or triples it's value vs missiles, but only works against attacks from the front and left (melee as well as missiles), meaning it makes a huge difference if you got your archers on the left flank or the right.
= The last value is the sound when hit.
stat_sec_armour 0, 0, flesh
= stats as above but for the mount. It does not have a shield for obvious reasons.
stat_heat 3
= How heat affects their stamina.
stat_ground 0, -1, -1, 0
= How different terrain affects them, probably with atk and/or parry/dodge. Each number is for a terrain type, can't remember the order.
stat_mental 13, normal, trained
= Morale of unit, followed by a setting if they may charge on their own or not and lastly how ordered the formation looks.
stat_charge_dist 2
= Charge distance....
stat_fire_delay 0
= Delay between firing missiles, in addition to the value in weapon stats.
stat_food 60, 300
= Not used.
stat_cost 1, 1164, 332, 115, 149, 1554
= Costs. First number is turns it takes to recruit it, then cost to recruit it, third is upkeep for the unit. Then upgrade costs for weapons and armour and finally the cost for the unit in custom battles.
ownership celts
= Who can buy them in custom battles. NOT who can build them in campaign, that's regulated by the EDB
( the ";" means that whatever comes after in that line is disregarded, so you can disable a line of code by putting ";" in front of it, something you'll see a lot in the EDB, as well as used for things like separations in the text and other things to make it easier for us that is reading it, but isn't used by the game in any way)