Snoopy said:
While this is a great idea, you can't say that a spear is more powerful than a sword.
Sure I can, although it would be an oversimplification. In a 1-on-1 battle, sure, each has its own pros and cons. But we're working on a strategic level, where it's force-on-force. And in that environment, I'd say that a well-trained army of swordsmen was superior to a similarly-trained army of spearmen (see also: Roman legions vs. Greeks, although the Romans probably had a significant experience edge); while their formation holds together, they're at a big advantage, but when they inevitably get flanked, or someone breaks formation, or a lucky hit opens a hole in the wall, what happens?
You're right that the spearmen would have an edge vs. mounted units, which is why pikes and halberds remained in use long after swords had been relegated to cavalry weapons. But, on a practical level, how would you put that into a free-form customization system like we're talking about here? You'd have to maintain separate unit types for each of these categories, which'd greatly reduce the number of upgrade steps you could fit into the system, which brings you right back to the Civ method of pre-packaging the units.
Make the early unit types be "Spear", "Melee", "Archer", and "Mounted". Each gets a +50% bonus versus one of the other types, in a circle: Mounted beats Archer beats Melee beats Spear beats Mounted. Each unit type has its own series of offensive and/or defensive promotions, each of which follows simple rules; Melee, for instance, might go Club-Axe-Sword-Mace for offense (which purely add to attack), and Bronze/Iron/Steel armors for defense. Spear units could use the same defense promotions, but their "offense" promotions (Pike, Halberd) add mostly to defense as well. At the other extreme, Archers get almost no defense but can go further with offense promotions.
Of course, this whole promotion-based system really makes things screwy when you're thinking about the long-term upgrades. For instance, in Civ3, I tweaked things a bit, so that the Swordsman upgrade chain went like this:
Warrior (1/1) -> Swordsman (3/2) -> Medieval Infantry (5/3, at Chivalry, with the Samurai as a UU replacement) -> Marine (6/4amphib, at Navigation; amphibious troops DID exist long before the Industrial Revolution, after all) -> Paratrooper (10/6 amphib drop, at Advanced Flight) -> Power Armor (don't ask).
Now, in that context, how would upgrading work? The only way to get a graphical change between the middle ages and the gunpowder units would be to upgrade the base unit, subtracting a number of promotions in the process (i.e., a Marine is equivalent to a 7-promotion Warrior, so a Medieval Infantry (a 4-promotion Warrior, with two promotions each on offense and defense) would need 3 more promotions to exchange for a 0-promotion Marine, but what do you do with a 6-promotion Warrior if the later upgrades aren't available on your existing "chassis"? You'd have two unusable promotions, unless you had the Barracks do both types of upgrade simultaneously. To get around this, you'd have to allow every unit level to theoretically reach each upgrade, and simply state that 0-4 promotions uses the "low-tech" base unit, 5-9 uses the "gunpowder" base unit, and 10+ uses the "high-tech" base unit. Which, in turn, means that you'd have things like a gun-toting unit with no defense still using the primitive graphics.
Plus, this means you have to code two different types of upgrading into the game engine (not a minor task).