The Ravenloft Campaign Setting varied between Stone Age and Renaissance throughout its various regions. As part of this it included stats for flintlock pistols as exotic weapons.
It also included a badass weapon called the Parthican rapier - basically a rapier with a pistol built into it. The neat thing was that if you struck someone with the rapier, you could fire the pistol as a free action, and the target didn't get Dex to AC.
Based on that...
Combination weapon
This weapon combines functions of any one melee weapon and any one ranged weapon.
Whenever you successfully strike with the melee component, you may make an attack with the ranged component as a free action. The target may not apply his Dex bonus to AC against this attack. However, such a weapon is difficult to use. A creature without the Exotic Weapon Proficiency feat for the specific combination takes a -4 penalty on attack rolls in addition to any penalties for proficiency with the component weapons.
Due to the complexities involved in their construction, combination weapons are always masterwork quality. To determine the price of a combination weapon, add together the costs for masterwork weapons of both the component weapons, then add the cost for masterwork again.
The component weapons are enchanted separately.
Weapon attachment
By adding +300gp to the cost of a weapon, it can be attached to another weapon of greater size (eg. a light weapon can be attached to a one-handed or two-handed weapon, a one-handed weapon can be attached to a two-handed weapon, and a two-handed weapon cannot be attached to anything else). If attached to a two-handed weapon, you must use two hands to wield the attachment, but do not gain any of the other benefits for wielding a weapon two-handed.
Transforming weapon
Select two or more weapons of the same size (light, one-handed or two-handed) and sharing a damage type (slashing, piercing or bludgeoning). This exotic weapon incorporates the features of all these weapons and can be shifted between them (this is equivalent to drawing a weapon). A creature without the Exotic Weapon Proficiency feat for the specific transforming weapon takes a -4 penalty on attack rolls in addition to any penalties for proficiency with the individual modes.
Due to the complexities involved in their construction, transforming weapons are always masterwork quality. To determine the price of a combination weapon, add together the costs for masterwork versions of all its modes, then add the cost for masterwork again.
All of a transforming weapon's modes share enchantments, but the cost of enchanting such a weapon increases by 10% for every mode after the first. At the DM's option, enchantments which cannot be applied to some of the weapon's modes can be substituted for similar enchantments.
Thoughts? I'm iffy on the balance combining weapons with non-reloading weapons, as Parthican rapiers had to be reloaded before you got that cool benefit again, which was impractical in melee. Maybe you need a free hand to use a longsword/longbow, and combining a non-crossbow with a two-handed weapon is impossible?
Has anyone else done work on stuff like this?