These are my Rhunaria homebrew D&D campaign's rules for flintlock firearms, the latest and greatest invention in the setting. They're just a bit different from historical ones, but fairly well based on historical accounts. The two move-equivalent actions to reload a musket are a relatively recent change to them, and one I'm not sure I'll keep; originally I had it as a full-round action to reload the musket, or two full-round actions nonproficiently. The two move-equivalents instead allow 2 shots every 3 rounds (round 1. load - two moves, round 2. fire and begin reload - standard+move, round 3. finish reload and fire - move+standard) (6.3 times per minute), whereas before with the full-round action load/reload the musket could only be fired once every 2 rounds (5 times per minute).
***********
Humans, dwarves, hobgoblins, kobolds, and goblins may start with crude black-powder weapons, but they are very rare and expensive. Flint-Lock Pistols are small ranged weapons of the projectile type, with a cost of 350 gp, 2d6 damage, 20 threat range, x3 critical multiplier, 50-foot range increment, weight of 3 pounds, and damage type of piercing. They require two hands to reload, which takes a move-equivalent action, or a full-round action for nonproficient characters.
Flint-Lock Muskets are similar, but are medium-sized, have a cost of 600 gp, do 2d8 damage, have a 150-foot range increment, and weigh 10 pounds. They also require two hands to reload, which takes two move-equivalent actions to reload, or two full-round actions for nonproficient characters. Neither firearm can be loaded any faster than normal, not even with the Rapid Reload feat, as it is simply impossible to load the crude devices any faster than proficiency in them already allows. However, two firearms may be fired simultaneously if held in different hands, in the same manner as two crossbows of equal size, if the wielder is of sufficient size. Neither firearm's damage is modified by Strength. The threat range of firearms cannot be increased by any means. Crude flint-lock firearms are barely accurate enough to aim at a specific target, let alone trying to hit a specific spot. There are no such things as masterwork firearms or masterwork bullets for firearms. Any firearm or firearm bullet may be enhanced with magic, however, as though it were masterwork. Firearm enhancements stack with those of the ammunition, as with a crossbow.
Firearm bullets come in bags of 10, which includes miniature powder packs for the bullets, and each bag of 10 bullets costs 5 gp and weighs 2 pounds. These are not the same as sling bullets. Both types of firearm hold only a single bullet at a time. There is a 5% chance that a firearm will not fire, discovered only when next the character attempts to fire, and in such an event the character must spend another move-equivalent action to remove the jammed powder pack and bullet, thus unloading it, and then they may attempt to load the weapon again normally (which still carries the same chance of not working, and the same bullet/powder pack may be used if the weapon failed to fire). Nonproficient characters require twice as much time to unjam and unload a firearm, and regardless, any firearm loaded by a nonproficient character suffers a 20% chance of not firing, in place of the 5% chance suffered when loaded by a proficient character. Exotic Weapon Proficiency (Firearms) grants proficiency in both Flint-Lock Pistols and Flint-Lock Muskets. Flintlock firearms can be fired from a prone position at no penalty, like crossbows.
Besides firearms, the aforementioned races also have access to black-powder explosives. A Black-Powder Bomb costs 200 gold pieces, deals 3d4 fire damage within a 5-foot blast radius (allowing all creatures in the blast a DC 20 Reflex save for half damage), has a range increment of 10 feet, and weighs 1 pound. It is a grenade-like weapon, so does not require proficiency to use, but requires a ranged touch attack, and can be thrown up to five range increments. A Black-Powder Bomb must be lit with a flame before throwing, which takes a standard action. Black-Powder Bombs have a fuse which can be of any length, and this determines how soon they explode after being lit. The fuse cord may be cut shorter, when desired. Regardless, the Bomb explodes after a certain number of rounds have passed, at the end of the appropriate turn of whomever lit the Bomb. Thus, if a fuse is long enough for 4 rounds, the Bomb explodes at the end of the fuse-lighter's 4th turn, counting only the turns after lighting the Bomb.
Any character who has readied an action to defend against the Black-Powder Bomb's user may use their readied action to kick the Bomb away immediately, before it can explode. This may also be done as an attack with a standard action or full-attack action, on any character's turn in which the Bomb is not already in the midst of being held, thrown, or kicked. Regardless, this counts as an attack, and the kicker chooses a target within 20 feet, applying the usual range increment rules for the Black-Powder Bomb. The kicker must succeed at a ranged touch attack to reach the target, otherwise the Bomb ends up in a random spot within 10 feet of the target, in a random direction from the target. Any character within reach of the Bomb may instead pick it up as a move-equivalent action which provokes attacks of opportunity from any opponents who threaten them. However, this move-equivalent action may not be taken with a readied action if the Bomb is set to explode at the end of the current character's turn (not the readied' character's turn). A Black-Powder Bomb explodes if destroyed while lit, but if destroyed while unlit, the Bomb just scatters its explosive powder all over the 5-foot space it was in. That powder will explode if any of it is exposed to flames (even a candle) or great heat.