Wait, is the damage formula,
attack_modifiers * max(min_damage_ratio_for_armor * base_damage, base_damage - effective_armor)
max(min_damage_ratio_for_armor * attack_modifiers * base_damage, (attack_modifiers * base_damage) - effective_armor))
attack_modifiers = hull_multiplier * attack_multipliers
hull_multiplier is the multiplier from hull bonuses/penalities
attack_multipliers is the bonuses from things like munitions boosters
effective armor = armor_multipliers * max(0, target_armor - armor_penetration - target_armor_rotted)
armor_multipliers is the multiplier from things like armor boosters or armor inhibitors (which set it to 0)
currently, min_damage_ratio_for_armor = .2
and base_damage is the base weapon damage except for ships with special damage calculations (polarizers, vultures, etc)
and the other variables should be self explanatory, hopefully.
Or MUCH less formally, are the hull and attack multipliers applied before or after armor considerations?