Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Ammunition and guns  (Read 1121 times)

UristMcGunsmith

  • Bay Watcher
  • "Shhh! My common sense is tingling!"
    • View Profile
Ammunition and guns
« on: October 17, 2009, 07:16:26 am »

I was wondering if you could have multiple ingrediants in a smelter reaction?

Say I wanted to make bullets for guns I'm working on, could I create a reaction that requires 2 ingredients? Like salt peter and stone to make gunpowder and projectiles for a new weapon?

On another note, could I replace the crossbow with another weapon?

Bricks

  • Bay Watcher
  • Because you never need one brick.
    • View Profile
Re: Ammunition and guns
« Reply #1 on: October 17, 2009, 10:24:10 am »

Not to be rude, but it's much easier to figure out what can and can't be done if you just crack open the raws.  Also, I recommend keeping this page on hand at all times.

I've never made any reactions, but the format seems simple enough.  You can certainly have a reaction that takes multiple reagents.  For example:
Code: [Select]
[REACTION:ELECTRUM_MAKING]
[NAME:make electrum bars (use ore)]
[SMELTER]
[REAGENT:1:METAL_ORE:SILVER]
[REAGENT:1:METAL_ORE:GOLD]
[PRODUCT:100:2:BAR:NO_SUBTYPE:METAL:ELECTRUM]
[FUEL]
Notice the multiple reagent tags.

As far as replacing crossbows, I think that is relatively easy.  Basically, open up the file for weapons, and edit the crossbow entry as needed.  As long as the tags indicating what sort of weapon it is remain in place, I think it will still work.  The bullets should probably still be tagged as BOLTS so you can still make them in dwarf mode.
Logged
EMPATHY - being able to feel other peoples' stuff.

Stargrasper

  • Bay Watcher
    • View Profile
Re: Ammunition and guns
« Reply #2 on: October 17, 2009, 12:10:01 pm »

If you want to use it in your own fortress, I believe you'll have to internally call it a crossbow(let it use the crossbow skill) or you won't be able to assign dwarves to use it.
Logged

NewoTigra

  • Bay Watcher
    • View Profile
Re: Ammunition and guns
« Reply #3 on: October 17, 2009, 01:52:10 pm »

For it to be usable in Fortress mode it needs to use the [CROSSBOW] skill tag, however, the ammo tags are completely variable.
You can make ammo which does different types or amounts of damage (slashing, pierce:30,5000) and label them all with the [BOLT] tag, which will make them all fireable by any weapon which has that tag for ammo.
You can also, interestingly enough, add more than one usable ammo tag to each ranged weapon(see here for more detail)

Basically, it must have
Code: [Select]
[RANGED:CROSSBOW:(insert your ammo type here)]to be used in Fortress mode.
Ammo type can be any.
Multiple repetition of this line are permitted, and each can have a different ammo type, so you could mod your game to have a crossbow that fired both bolts and arrows, but bows could still only use arrows.

Sorry if this is a bit hard to read/understand, I'm somewhat tired atm.
Logged

Grax

  • Bay Watcher
  • The Only.
    • View Profile
Re: Ammunition and guns
« Reply #4 on: October 17, 2009, 02:30:57 pm »

The main problem that we can't forge more than 25 bolts out of one bar.
Logged
Finis sanctificat media.

Eagle0600

  • Bay Watcher
  • Highly Confused
    • View Profile
Re: Ammunition and guns
« Reply #5 on: October 18, 2009, 08:18:41 am »

We can if we use smelter reactions. Or the custom workshops that are coming up (which would be better suited for this, I think).
Logged
GENERATION 21:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Grax

  • Bay Watcher
  • The Only.
    • View Profile
Re: Ammunition and guns
« Reply #6 on: October 18, 2009, 08:42:01 am »

We can? How? Please give me reaction that makes a stack of 100 bolts. ;-)
Logged
Finis sanctificat media.

Daywalkah

  • Bay Watcher
    • View Profile
Re: Ammunition and guns
« Reply #7 on: October 18, 2009, 09:06:18 am »

[REACTION:MAKE_AMMO]
[NAME:make ammo]
[SMELTER]
[REAGENT:5:METAL:NO_MATGLOSS]
[PRODUCT:100:500:AMMO:ITEM_AMMO_BOLTS:METAL:NO_SUBTYPE]

If you want to cheat, remove the whole reagent line  ;).
« Last Edit: October 18, 2009, 10:21:15 am by dragon1423 »
Logged
Magma cancels flow; interrupted by Ironblood.

Grax

  • Bay Watcher
  • The Only.
    • View Profile
Re: Ammunition and guns
« Reply #8 on: October 18, 2009, 09:31:47 am »

[REACTION:MAKE_AMMO]
[NAME:make ammo]
[SMELTER]
[REAGENT:5:METAL:NO_SUBTYPE]
[PRODUCT:100:500:AMMO:ITEM_AMMO_BOLTS:METAL:ELEMENTIUM]
If you want to cheat, remove the whole reagent line  ;).
And they'll be really 100 bolts in one stack? WTF. I've tried that and didn't get a result. (Hmm. Or i tried it another way?)

Gone for 5 minute to check irl.
Logged
Finis sanctificat media.

Grax

  • Bay Watcher
  • The Only.
    • View Profile
Re: Ammunition and guns
« Reply #9 on: October 18, 2009, 09:49:32 am »

FFFFFFUUUUUUUUUUU  :o

Really 500. Amazing. Wonderful.


Reagents are failed in your reaction.
Need to be written like [REAGENT:20:BAR:NO_SUBTYPE:METAL:NO_MATGLOSS] to consume some bars, as with your variant smelter casts them out of nothing.
Logged
Finis sanctificat media.

Daywalkah

  • Bay Watcher
    • View Profile
Re: Ammunition and guns
« Reply #10 on: October 18, 2009, 10:18:02 am »

Sorry, I forgot I was using a mod and you don't have elementium. I'll change it. Would it be NO_SUBTYPE or NO_MATGLOSS? Ohhhhhhhhhhhh.
« Last Edit: October 18, 2009, 10:19:41 am by dragon1423 »
Logged
Magma cancels flow; interrupted by Ironblood.

Grax

  • Bay Watcher
  • The Only.
    • View Profile
Re: Ammunition and guns
« Reply #11 on: October 18, 2009, 10:41:41 am »

Sorry, I forgot I was using a mod and you don't have elementium. I'll change it. Would it be NO_SUBTYPE or NO_MATGLOSS? Ohhhhhhhhhhhh.
Nonono. I'm speaking about reagent, not product.

(I changed elementium to iron if we're about compatibility ;-).
Logged
Finis sanctificat media.

Daywalkah

  • Bay Watcher
    • View Profile
Re: Ammunition and guns
« Reply #12 on: October 18, 2009, 11:06:33 am »

Ok, is it right now?
Logged
Magma cancels flow; interrupted by Ironblood.

Grax

  • Bay Watcher
  • The Only.
    • View Profile
Re: Ammunition and guns
« Reply #13 on: October 18, 2009, 11:45:34 am »

Aha.
Logged
Finis sanctificat media.