2 kinds of firearms, simple and military.
Simple firearms are equal in power to military ranged weapons. They get the following trade off: increase damage die, increase reload time (free becomes minor, minor becomes move). They are balanced to allow characters to have in place of military ranged weapons.
Any class with proficiency in martial ranged weapons gains proficiency with simple firearms. Dwarfs gain proficiency with simple firearms in place of hammers and axes for their racial weapon proficiency. Rogues can take a feat to gain proficiency in simple firearms, and use firearms for their powers and sneak attacks.
Crossbow --> pistol: +2 prof, 1d10, load move, off hand, fire one handed
Useful in a tight spot, this gun is versatile and lightweight.
Shortbow --> small rifle: +2 prof, 1d10, load minor
This powerful gun can eliminate serious threats.
Longbow --> long rifle: +2 prof, 1d12, load minor
A collectors piece used by trained veterans to take out enemies from a distance.
Military firearms are equal in power to superior ranged weapons. They deal one die larger damage, and take longer to reload. Players must take a feat to use these better than average weapons, as is the case with superior weapons. Players must have proficiency with simple firearms to take proficiency with a military firearm.
Greatbow --> Longshot rifle: +2 prof, 2d6, load minor
A primitive sniper rifle that packs a serious punch.
Superior crossbow --> Revolver: +3 prof, 1d12, load move
Many warriors develop sentimental attachments to these deadly sidearms.
Two new weapon classes: rifles replace bows, pistols replace crossbows.
Clockwork upgrade: Players can have their weapons upgraded to clockwork versions. This improves load time to the original template weapon for each while maintaining the high damage. Ex. pistol becomes load minor and longshot rifle becomes load free. Special: revolver remains load move, but can fire 6 times before requiring a reload.
Clockwork upgrade weapons are strictly better than PHB weapons in terms of balance by about 1-2 damage. The trade off is the cost of the clockwork upgrade, and the rarity/cost of ammunition.
Class/Race alterations:
Dragonborn: breath weapon damage types can be steam (deal fire damage, but different flavor) or rust (a new damage type, you might give some constructs vulnerability to rust).
Dwarf: simple firearms replace hammers for dwarven weapon proficiency.
Elf: short and long rifle in place of short and long bow.
Human: You gain proficiency with pistols.
Fighter: Fighters are proficient with simple firearms.
New fighter weapon talent: firearms, you may use firearms for your fighter powers, even in melee. Use your strength modifier as normal. You may use firearms to make opportunity attacks (you still only threaten square adjacent to yourself). You may use firearms for attacks granted by your combat challenge. Your combat challenge attacks can target any enemy within range that you have marked, rather than just adjacent ones.
Ranger: Rangers are proficient with simple firearms.
You can use a firearm in place of a bow for ranged powers.
You can use a pistol in place of a melee weapon for attacks that require an off-hand weapon. You still use the ability score appropriate to the power.
Rogue: Rogues are proficient with pistols. Their weapon trick ability gives them +1 to hit with pistols. They can use pistols for sneak attacks, and any power that requires a light blade. If the power is a melee attack only, they must use the pistol to target an adjacent enemy.
New rogue tactic (in place of artful dodger or brutal scoundrel): Gunslinger
You may use a pistol in your off hand to perform opportunity attacks (you still only threaten squares adjacent to yourself). Use your Cha instead of strength for these attacks. When you deal sneak attack damage to an enemy, you may make an opportunity attack against them as an immediate reaction if you are using a pistol in your off hand.
Feats:
weapon proficiency, simple firearms (proficiency with all simple firearms)
weapon proficiency, military firearms (proficiency with one military firearm)
Blade opportunist: bonus also applies to opportunity attacks made by rogues with pistols
Dwarven weapon training: this feat can apply to firearms instead
Far shot: also applies to pistols and rifles.
Nimble blade: rogues and fighters can use pistols
Quick draw: Once during the surprise round, you may make a ranged basic attack with a pistol as a minor action.
Two weapon fighting, two weapon defense: you can use a pistol in your off hand instead of a melee weapon.
Extras:
Grenades, bombs: use alchemy items from adventurers vault
Spells: add some variants of wizard spells that use rust and metal damage instead of radiant and necrotic (flavor goes from gods/magic to technology).
Sniper rifle: as longshot rifle, but standard reload. When you have combat advantage against a target 5 or more squares away, the sniper rifle has a +5 proficiency bonus against that target instead of +2, and inflicts a critical hit on a roll of 18 or higher.
I might proofread/add to this later.