Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Gunpowder >:D  (Read 1765 times)

sillybear25

  • Bay Watcher
    • View Profile
Gunpowder >:D
« on: June 08, 2008, 10:34:00 pm »

Well, I'm new to modding DF and I thought I'd try out a couple of experiments, including different fertilizer production methods, a new entity (Orcs), and this, my latest creation, black powder. I'm sure it's been done before, but I'm happy with it. So far, I really haven't figured out anything to do with it, as I can't think of any way to get it to ignite reliably while still in a controlled manner. It builds off of a discovery that "exploding" booze is really just boiling booze. If anyone has any ideas, let me know. Otherwise, here's the code:

Added to matgloss_metal:

code:
 [MATGLOSS_METAL:GUNPOWDER]
[NAME:black powder][ADJ:black powder][COLOR:0:7:0]
[VALUE:30]
[SPEC_HEAT:50]
[BOILING_POINT:10125]
[IGNITE_POINT:10120]
[SOLID_DENSITY:500]
[BRITTLE]


Added to reaction_standard:

code:
 [REACTION:GUNPOWDER_MAKING_SULFUR]
[NAME:make black powder with brimstone]
[SMELTER]
[REAGENT:1:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]
[REAGENT:1:STONE:NO_SUBTYPE:STONE:BRIMSTONE]
[REAGENT:1:STONE:NO_SUBTYPE:STONE:SALTPETER]
[PRODUCT:1:BAR:NO_SUBTYPE:METAL:GUNPOWDER]

[REACTION:GUNPOWDER_MAKING_REALGAR]
[NAME:make black powder with realgar]
[SMELTER]
[REAGENT:1:BAR:NO_SUBTYPE:COAL:NO_MATGLOSS]
[REAGENT:1:STONE:NO_SUBTYPE:STONE:REALGAR]
[REAGENT:1:STONE:NO_SUBTYPE:STONE:SALTPETER]
[PRODUCT:1:BAR:NO_SUBTYPE:METAL:GUNPOWDER]


I think I caught all the errors in the code as I was posting it here, but if anyone has any ideas/corrections, let me know. For the ignition and boiling points, I used the boiling point of alcohol, and just went a little bit lower for the ignition point, figuring that the infamous booze explosions would be a good model.

EDIT: By the way, the reason for the two different reactions is that, according to Wikipedia, the Chinese originally made gunpowder with realgar rather than pure sulfur.

Anyway, if anyone has any suggestions, let me know.

EDIT2: Maybe if I made it a "wood" instead of a "metal" I could make ballista bolts... there's still no reliable way of igniting them though...

[ June 08, 2008: Message edited by: sillybear25 ]

[ June 08, 2008: Message edited by: sillybear25 ]

[ June 09, 2008: Message edited by: sillybear25 ]

Logged

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: Gunpowder >:D
« Reply #1 on: June 08, 2008, 10:56:00 pm »

Hmmm... wow. That's pretty well done. I must admit I expected a thread that said this:

"L0L, somebody set us up some bombs and guns and tanks kthksbi!"

But actually, I think I could use this. I believe what was talked about before was making a kind of stone that had a fixed temp hot enough to detonate your powder, and then drop one onto the other somehow. I would love to have bridges fling fuse rocks onto stockpiles of gunpowder under skylights into an entrance hall full of goblins/kittens/elves.

I'll look into making a fusestone that can be created, perhaps by treating the gunpowder further.

Oh, for the balistas, I don't think there is a way to create explosive bolts. However; if the gunpowder and fuse where stones, then you could use catapults to launch one and then the other- if they land in the same square... yay!

[ June 09, 2008: Message edited by: PTTG?? ]

Logged
A thousand million pool balls made from precious metals, covered in beef stock.

sillybear25

  • Bay Watcher
    • View Profile
Re: Gunpowder >:D
« Reply #2 on: June 08, 2008, 11:04:00 pm »

hmm... didn't think of using it with machinery. lol, I can see it now: The goblin steps on a pressure pad. A ceiling hatch opens, dropping a flaming rock! The rock lands on a pile of black powder! KABOOM! The goblin has been struck down.

The sort of stuff I was thinking of, on the other hand, involved the slightly reliable method of chucking it over something hot, hoping that it might just pass over it long enough to catch fire...

Anyway, I like your idea. Maybe I'll try it out, and then run a few tests. So far, I haven't really tested any of this at all... Don't be surprised if you try it out and your smelter explodes  :(

[ June 09, 2008: Message edited by: sillybear25 ]

Logged

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: Gunpowder >:D
« Reply #3 on: June 08, 2008, 11:14:00 pm »

...Don't be surprised if you try it out and your smelter explodes   :(  ...

You make it sound like that's a bad thing! I'm going to mess with this too and get back to you. Way back shortly after the z-level update, I think, there was a guns and gunpowder mod, but it was kind of overcomplicated. This one seems like it could work.

Logged
A thousand million pool balls made from precious metals, covered in beef stock.

sillybear25

  • Bay Watcher
    • View Profile
Re: Gunpowder >:D
« Reply #4 on: June 08, 2008, 11:50:00 pm »

Also, as an additional note: If you want this to be anywhere near usable, I recommend modding the game to reduce the rarity of saltpeter and either brimstone or realgar, all of which currently only appear in small clusters (about five stones per cluster) where veins or even large clusters would be preferable. You still won't be guaranteed everything you need to make gunpowder, but it would be more likely...

Also, a question about the value: I figured since, like steel, most of the materials are fairly inexpensive (or, in the case of steel, the expensive materials are plentiful) and the result is rather powerful, that it would be a good equivalent in-game value. Do you think this is fair, over-valued, under-valued...?

Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Gunpowder >:D
« Reply #5 on: June 09, 2008, 10:09:00 am »

It's hard to talk about value until we get something to work.
My suggestion if you want it to be usable as ammunition material you may try to make it "bone" type. Just beware of gunpowder leggings then made by your legendary bonecrafter.

The kobold has stolen your =gunpowder leggings=
The kobold is caught in flames.
The kobold has been struck down.

Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

SHAD0Wdump

  • Bay Watcher
  • Hiding in SPAAACE!!!
    • View Profile
Re: Gunpowder >:D
« Reply #6 on: June 09, 2008, 11:31:00 am »

Now thats a nice trap.  :D
Logged

sillybear25

  • Bay Watcher
    • View Profile
Re: Gunpowder >:D
« Reply #7 on: June 09, 2008, 12:15:00 pm »

I just had an idea: if you change the material to bone instead of metal, you could make bolts out of it, and then if you lowered the ignite point to below the homeotherm of warm-blooded creatures (10067 DF, 99 F), you could have crossbow bolts that set enemies on fire, then "explode" (boil).

Possible problems:
*gunpowder might ignite when handled by warm-blooded creatures
*gunpowder might not ignite when striking an enemy
*gunpowder would definitely not ignite when striking a cold-blooded enemy (unless of course you want gunpowder that ignites at room temperature...)

Logged

Techhead

  • Bay Watcher
  • Former Minister of Technological Heads
    • View Profile
Re: Gunpowder >:D
« Reply #8 on: June 09, 2008, 02:41:00 pm »

I think it should have 2 seperate steps. There should be a smelter reaction to make sulfur bars, and an alchemy reaction to make black powder from sulfur bars and saltpeter. Also, could you possibly make it black "powder," not "black-explosive-bars"?

Also, sulfer can also be obtained from other sulfides such as pyrite, cinnabar, galena, orpiment, stibnite, and sphalerite.
That might take care of the sulfur rarity problem somewhat, so you just need to make saltpeter more common.

Or, you could allow for rotten organics (Instead of manure) mixed with ash to be used in the production  of saltpeter.

Logged
Engineering Dwarves' unfortunate demises since '08
WHAT?  WE DEMAND OUR FREE THINGS NOW DESPITE THE HARDSHIPS IT MAY CAUSE IN YOUR LIFE
It's like you're all trying to outdo each other in sheer useless pedantry.

sillybear25

  • Bay Watcher
    • View Profile
Re: Gunpowder >:D
« Reply #9 on: June 09, 2008, 09:06:00 pm »

the problem with powder is that in order to get powder, it has to be made from a plant (at least as far as I know... maybe I'll experiment with using plant tokens on non-plant items...)
Logged

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: Gunpowder >:D
« Reply #10 on: June 09, 2008, 10:53:00 pm »

Well, I've been using stones for this and so far I've gotten to the point of having a fuse-stone explode in the smelter; apparently the [FIXED_TEMP:###] works. Still trying to get both the black powder AND the fuse stone into the same tile.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Gunpowder >:D
« Reply #11 on: June 10, 2008, 09:41:00 am »

dump the fuse stone down a hole on the floor above, maybe with a bridge that can be pulled open_
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

Zironic

  • Bay Watcher
  • [SDRAW_KCAB]
    • View Profile
Re: Gunpowder >:D
« Reply #12 on: June 10, 2008, 10:01:00 am »

Simple make a smelter reaction: Gunpowder + 1 bar lead + 1 bar copper ( for the jacket), to make explosive rounds (that have all the properties of gun powder, just smelted into a bullet form - really a bolt...) You use archery targets and very low-skilled crossbowmen to set off explosions. --- or use a long stockpile that leads to a large one, and sacrifice a hauler.
Logged

Techhead

  • Bay Watcher
  • Former Minister of Technological Heads
    • View Profile
Re: Gunpowder >:D
« Reply #13 on: June 10, 2008, 12:40:00 pm »

Argh...
I didn't know about the restrictions on reactions.
Smelter only, no products stored in bags or barrels, no reagents stored in bags or barrels.
Oh well, you could make a sulfur bar reaction and a coal-free black-boom-blox reaction.
Logged
Engineering Dwarves' unfortunate demises since '08
WHAT?  WE DEMAND OUR FREE THINGS NOW DESPITE THE HARDSHIPS IT MAY CAUSE IN YOUR LIFE
It's like you're all trying to outdo each other in sheer useless pedantry.

sillybear25

  • Bay Watcher
    • View Profile
Re: Gunpowder >:D
« Reply #14 on: June 11, 2008, 09:43:00 am »

to anyone talking about bullets: That's been done before. I was really trying to go more for a realistic gunpowder and explosives mod rather than firearms. I was just trying to think of reliable ways of igniting the stuff. I also seem to be having trouble testing the stuff, mostly because I can't make it because it always seems that I can never bring both ingredients with... I've tried creating cheater "free stuff" reactions, but they don't seem to work. Suggestions?
Logged
Pages: [1] 2