I've been wondering of late just how I could bring guns into a Kingmaker campaign, less so for an individual character and more raising a unit of 'pike and shot' for whatever army characters might build.
What sort of resources would or should a kingdom have before allowing this? I was figuring a Garrison and Exotic Craftsman at the very least to model the expense of resources that would be required to set everything up.
Methinks that all you'd really need from a resource perspective is a large bat population*.
Gunpowder is made by mixing charcoal, sulfur, and potassium nitrate in specific ratios to create the stuff. Charcoal you can get from burning trees, and Sulfur should be available via the Skunk River, (noted for it's sulfurous smell - I run that there are sulfur deposits at its origin and along its banks). Potassium nitrate is found in bat poop, hence the bat population!
In my game I've put in a couple of gunpowder mine sites -- effectively large enough caves supporting bat populations that could be used as a resource.
*Potassium nitrate can also be made via a process using urine and straw, but takes some time (months) as it needs to ferment. Aaah the joys of alchemy!
Hope it helps!
My game was a bit more involved. There was a side-trip to Absalom, wherein the PCs contacts set up a meeting with an ex-patriate Alkenstar gunsmith, who felt the duchy's export controls/monopoly were stiffling creativity, and with the River Kingdoms far outside the Garundi duchy's sphere of influence, they wooed him back to their kingdom, and used the guns as leverage to sign a permanent treaty with the Sootscales.
The result: the kingdom is somewhere between "Emerging Guns" and "Commonplace" guns, after building an Exotic Craftsman, Smithy, and Siegeworks (from Wayfinder #5, p. 18) to represent the infrastructure.
In short, firearms are still exotic, but early firearms are 25% cost, cheap enough to equip specialty forces in small amounts (akin to masterwork weapon costs). Advanced firearms do exist, but are handmade at full price by the aforementioned gunsmith, and generally relegated to one of the PCs, a Sootscale kobold gunslinger.