1. Rapiers were poor against heavy armour. They rose to popularity as civilian self-defense and dueling weapons against mostly unarmored opponents. Consider that armour was obsoleted neither by rapiers, bows or even the dreaded but slow crossbow, but by a combination of firearms and massed infantry tactics, most notably pike formations vs cavalry and early guns vs anything less than quality plate.
2. Bows also were poor against heavy armor, even longbows. If you examine the oft-quoted battles where longbows were used heavily to good effect, knights were typically defeated by a number of factors, most prominently charging over bad cavalry terrain and having their lighter-armored horses shot at leisure from the flanks. Even so, the knights were often still described as being actually killed by men-at-arms in melee. Conclusion: The cavalry charge was defeated by longbows, terrain and stakes, the armour not so much. ("Idiot commanders" also comes to mind, but knights could be notably difficult to command reliably as it were.)
Battles that simply involved knights and infantry with longbows but without extensive terrain choice and preparation (muddy fields, stakes, ditches) on the part of the defenders tellingly resulted in massacre on the longbows end and virtually no losses by the knights. (See battle of Patay for instance, 1500 cavalry vs 5000 infantry mostly composed of longbowmen. Infantry losses 2500, cavalry losses 100.) You just don't hear about those battles quite so much in english-speaking culture for some reason. Hmm!
The longbow is a bit like Britain's katana: It can cut through tanks, shoot bullets out of the air, etc.
I just realised that I've been imagining maces wrong this whole time. They were merely a sphere on a stick until now.
Anyway, is it me or maces are pretty suckish? What avantage do they offer compared to hammers?
(Assuming you mean in reality, though DF does a pretty good job of this IIRC...) If the poor target is wearing no armor, a mace will crush about as well as a hammer, pound for pound. Either way you are in for some pain whether you are hit with a hammer or a mace.
On the opposite high end, if the target is wearing a non-flexible armor like plate, with padding underneath, a mace and hammer are still about equal, pound for pound. Either way the only thing they will feel is the total impact, which will be spread out and cushioned. Heavy impact may still cause enough shock to stun or daze a target. That's assuming you are striking the armor directly, not a joint.
However, if the target is wearing padding and armor that does flex, The hammer's impact will be cushioned more than the impact of a mace. This applies not only to armor like padding and maille, padded or unpadded leather armor, etc, but also to the joints of plate type armors - in fact, a flange may strike into the joints of plate armor where a flat hammer would not be able to at all.
In other words, if you have a flanged mace available, there is no reason to use a hammer. The hammer offers no advantages other than being simpler to produce. The mace is better in virtually any scenario involving armor.