Originally Posted by
Alavaria
Hmm, does this show those units which do things like have a normal spear or javelin but a special armor-piercing secondary attack?
Hey Alavaria, thanks for your interest.
It shows all units in EDU.txt. I don't really see which units you're targeting exactly.
Perhaps the units which have a 'prec' attribute in 'stat_pri/sec_attr' ? (from the comments in EDU.txt: "Missile weapon is only thrown just before charging into combat")
I'm conscious of some game mechanics but not all; A unit is converted from EDU.txt to the format required for this tool like so:
(orange = stat lines that were split into separate properties; red = involves some conditionals and calculus )
Code:
{
"dictionary": "barb_peasant_briton",
"category": "infantry",
"class": "light",
"attributes": [
"sea_faring",
"hide_improved_forest"
],
"size": 60, => from soldier (2nd stat)
"heat_penalty": 2,
"charge_distance": 30,
"fire_delay": 0,
"turns": 1, => from stat_cost (1st stat)
"cost": 150, => from stat_cost (2nd stat)
"upkeep": 100, => from stat_cost (3rd stat)
"def_armour": 3, => from stat_pri_armour (1st stat)
"def_skill": 1, => from stat_pri_armour (2nd stat)
"def_shield": 0, => from stat_pri_armour (3rd stat)
"morale": 0, => from stat_mental (1st stat)
"discipline": "low", => from stat_mental (2nd stat)
"training": "untrained", => from stat_mental (3rd stat)
"charge_bonus": 0, => from stat_pri (2nd stat) if the unit's stat_pri 4th stat ['missile type fired'] = 'no', else from stat_sec (2nd stat)
"melee": 1, => from stat_pri (1st stat) if the unit's stat_pri 4th stat ['missile type fired'] = 'no', else from stat_sec (1st stat)
("missile": 2), => from stat_pri (1st stat) if the unit's stat_pri 4th stat ['missile type fired'] is not 'no', else from stat_sec (1st stat), or if both are 'no': omitted
"ownership": [
"britons"
]
}
A def_total stat is added at run-time which adds def_armour + def_skill + def_shield.
I haven't verified yet that it is correct. Please feel free to point me at important stats that I have forgotten, or exception cases, and the likes.