I posted this on another forum, quiet day at work:
I've put together a process flow for producing gunpowder based on real life gunpowder production, what's avaliable in DF, and what could be modding it.
Stuff in diamonds are mined/gathered items, stone and wood. Rectangles are buildings, and the hexagons are items that are manufactured.
Items in green would have to be added to the current game.
As it appears you cannot add new orders to existing buildings a new building such as a refinery would be required.
Sulphur production at the technology level of dwarves would realistically involve one more step for distilling, but considering the amount of steps involved already it might be a bit much.
You could also add barrels or bags as a one of the items required for the final step of gunpowder production, or the production of the refined sulphur and saltpeter. It might be a nice way of making bags more useful.
So producing gunpowder would require the following items:
1 x Sulphur
1 x Saltpeter
2-5 wood depending on whether or not buildings are magma powered.
Those items would produce:
1 x Refined Sulphur
1 x Refined Saltpeter
1 x Charcoal
Which would then be used at the Gunpowder Mill to produce gunpowder.
New items required for the process would be:
Refined Sulphur
Refined Saltpeter
New buildings:
Gunpowder Mill
Refinery
New actions:
Refine Sulphur
Refine Saltpeter
Produce Gunpowder
At this point in time I don't think sparking/non-sparking millstones would be that easy to introduce, as I'd expect they'd need their own flag programmed like magma proof buildings, hopefully that won't ruin anyone's immersion.
So as far as I can see it wouldn't be a massive effort to mod in something like gunpowder production. If you could add ammo and hand cannons to the forge production menu it would save making a new building, but you could probably create a new building to make those items, and have it magma or wood fueled like current forges.
As I believe projectiles are moddable you should be able to simulate the effect of a large round ball of lead hitting a goblin at high speed, which I would guess would be very effective as blowing off limbs and heads.