I’d be interested to hear more about the mechanics you’ve considered for this and very interested in the details of the problems with the math. If you don’t think it’s solid enough to discuss here yet, you’ve got my email.
Simply that a typical +1 sword has a base gp cost of 5,000gp and special component cost of 5,000gp. Thus it would be 10,000 xp for a sword +1.
If a fighter devotes 25% of his XP towards his weapon (which seems a high percentage) it would take him many, many levels to get even a +1 weapon.
What if you combined the two things? Letting great deeds substitute for the material needs of improving an item, but still using the existing rules for creating or improving magic items through the efforts of mages and their kin.
For example, Blarkon the barbarian finds and wields a +1 two handed sword from 3rd level on. At 7th level, he slays (with help, but his deeds turn the tide and finish the beast) a dragon that had been terrorizing the borderlands, and takes on the sobriquet, “the Dragonslayer.” Several more dragons fall to the barbarian and his friends over the course of their adventures. At 9th level, his friend Olias the Mage wants to make Blarkon’s sword into a +2 two handed sword, +3 vs. dragons.
Normally this would take over a hundred ogre corpses, and a substantial number of dragon corpses to make happen. But since Blarkon has already done such great deeds of dragon slaying, and his mighty sword Ironclaw has already tasted much draconic blood, the GM waives the need for dragon parts for the extra plus vs. dragons, leaving just the need for the ogre parts as the sword is forged anew.
Added to the above, the cost in gold for improving the sword would remain unchanged. But the fiction certainly supports the idea of a great mage gifting a hero with a mighty blade, so I think it would work.
That certainly seems like a good and reasonable system, but it doesn’t quite do what I’m looking for here, as it still requires a wizard to deliberately enchant the blade with an effect chosen by the player(s) and I’m trying to devise a balanced mechanism for items to be spontaneously empowered with GM-determined abilities that are not under the players’ direct control. (Since the abilities should be “appropriate”, the players can influence the general nature of the empowerments through their actions, but they don’t get a menu of options to pick the exactly most optimal enchantment from.)
i think your best bet, then, is to keep it simple and replace found magic items from a creature’s treasure with upgrades. not all of them, mind you, just some of them.