Gunpowder Damage?

Can someone explain to me how damage types work?

My understanding is this:
Melee is reduced by the by the Melee Armor
Ranged is reduced by the by the Ranged Armor
Gunpowder and Siege damage is “unblockable”?

Example:
Grenadier do 18 damage in a small area no matter what they hit, or the armor it has
Archer does 17 damage to a unit with 0 ranged armor and 15 to someone with 2 ranged armor.

I know there are some unit specific increase/decreases in damage to others, like spearman vs horse, but I’m trying to get an idea for what damage type I should be looking to build against heavy, light, etc.