I purposely don't upgrade my Crossbowmen to Riflemen because they lose their ranged attack. If you keep Crossbowmen on hills, they slaughter incoming Riflemen, especially if you have bonus to attack in your territory, a Great General, and bonus to attack when beside allied units.
Yes, ranged attack is amazing. I keep my crossbows/chu ko nus as they are and upgrade my knights to cavalry for melee.
As for the real life side, the reason archers and crossbowmen can attack at range while rifles can't is because it's more of an
indirect attack rather than a ranged one. If your friend is between you and your target when you're firing a bow, you arc it over him. If you have a rifle in that situation, you either don't fire or you friend is getting shot in the back.
Muskets vs bows is a slaughter if the archer is trained. A trained archer can keep 2 arrows in the air at any given moment (as in he can loose the second shot while the first is still in the air), is more accurate, has longer range, hits just as hard against guys wearing a glorified jacket, and the archers themselves will in all likelihood not be standing shoulder to shoulder so a missed shot hits the guy next to him. Compare to a musket which even the best professional soldiers using comparatively advanced methods from the 1700s (as opposed to when muskets were introduced in the 1400s) could only fire 4 times a minute, couldn't hit anything beyond 100 meters, and would be standing in a formation that honestly is pretty hard to
miss. The reason muskets were adopted over bows was that they were easier to use and scared the




out of peasants who didn't know better.