Thanks to video games and Hollywood, many people have the impression of “swordsmen are heavy, all-round, front line units while spearmen are low-rank weak units only good at countering cavalry”, or swords being the only important melee weapon.
That do not reflect their real roles. Most swords (I would also count short hand axes) were side arms. Having dedicated sword units is like dedicated pistol units in games about modern warfare. Spears and other polearms were the actual front line weapon. The primary weapons of the shield wall were the spears not swords or axes.
So instead of simple-mindedly creating the sword and spear dichotomy, I think a better representation would be “front line infantry” and “skirmish infantry” for the melee infantry units (without making one unit type too versatile):
- The spearmen or infantry with other types of polearms should be the typical heavy front line infantry. They have okay damage, okay hp, okay speed ——basically average everything. They still counter cavalry, but only in formations (represented in the game as switching to specific stances, being immobile for a few seconds and/or having a sufficient amount of similar units nearby). When they are not in formations they switch to swords which deal average damage with no bonus.
- Specialized swordsmen are fast, light raiding units. They have a high base damage that allows them to trade well with the spearmen when the latter are not in formation. They can be good at flanking the spearmen forcing them to break formations. They could also raid ranged units when microed properly. As dedicated swordsmen were rare, they would not be the common unit but unique to certain civs (like the Spanish rodelero). Some could also be equipped with light javelins. Their difference from light cavalry is they take no bonus damage from the spearmen, but still from typical infantry counters.
Basically, they should be more like Greek hoplites and hypaspists in AOM, respectively.
There could still be light, specialized spearmen not good at other tasks to reflect the low-rank levied troops, like the Egyptian spearmen in AOM, but they are not the same class as the aforementioned front line spearmen. They could be in a unique roster of certain civs/regions or early game stages without professional infantry.
Now some seemingly outliers:
- Roman legions: some people simply consider them as swordsmen. But they also have heavy javelins (like a spear but in range) and large shields, making them front-line heavy units.
- Zweihanders, nodachi, Dane axes, poleaxes, etc.: these things function more like polearms than swords or axes. They could be given to unique front line infantry with higher base damage but lower counters, like several melee infantry in AOE3.
In short, what determines the unit’s battlefield roles and counters (as a game concept) is the formation not the looks of the weapon.