That's an interesting find Dabo, I might have to change that too. The AI definitely seemed to perform better there. Does it have an effect on sieges?
AI aside, a key issue for me with most archers is that they get a similar melee weapon, melee skill and armour to dedicated infantry of the same tier. They trade a shield for the ranged weapon and ammo but it really gives them an advantage in most situations - with palatine guard in particular they're still strong in melee if infantry do reach them.
Do archers really need a T5 melee weapon, 130 1H skill (matching T5 infantry) and 50 body armour?
In my personal unit mod I've edited every faction unit and with ranged troops I've reduced the quality of their melee weapon/skill and given lower armour across the tiers. They still improve with each upgrade but they're always lower in those aspects than their faction's infantry at the same tier. With crossbowmen I make them a bit better in melee than pure archers as they only run 1 set of ammo while pure archers run 2 but still lower than dedicated infantry.
It means that if/when infantry do reach archers they have the upper hand if they still have enough alive, compared to vanilla unit stats where archers turn into Legolas wielding a blade once infantry reach them. T5 archers still perform in melee against low tier infantry but T5 infantry have more of an advantage. It makes me think more about protecting my archers.
It'd be interesting to see the impact of your code modification in addition. Which file is the edit in?