I would use the following for the data file:
weapon_class{
id = "sword",
attack_sprite = "sword_attack",
charged_attack_sprite = "sword_charged_attack", --i.e. spin attack
damage_modifier = -1,
}
weapon_class{
id = "spear",
attack_sprite = "spear_attack",
charged_attack_sprite = "spear_charged_attack",
damage_modifier = 0,
}
weapon{
id = "simple_sword",
class = "sword",
damage = {6, 7, 8, 10, 12, 15}, --rank 1 is 6 damage, rank 6 is 15 damage
}
weapon{
id = "legendary_spear",
class = "spear",
damage = {8, 10, 13, 16}, --rank 1 is 8 damage, rank 4 is 16 damage
}