Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Question about changing the way ammo is crafted  (Read 1052 times)

Sprocket809

  • Bay Watcher
    • View Profile
Question about changing the way ammo is crafted
« on: September 27, 2014, 03:35:09 pm »

Hey, I'm fairly new to DF modding, but I am already excited about adding things to the game and possibly creating a modpack (not something huge like masterwork, but something small and easily installed). My current project is adding hand cannons to the game. The way I decided to go about this is by creating an alchemist's laboratory, where brimstone can be processed into sulphur powder, niter (I renamed the default saltpeter stone) can be processed into saltpeter, charcoal, sulphur and saltpeter can be made into gunpowder, and gunpowder and shot (metal balls made at forges) combined to make bullets, which are the ammo for the hand cannons. The velocity of the bullet usually ensures that the bullet can't be picked up afterwards, balancing the extreme power of the handcannon.

However, I think (not exactly sure yet, haven't tested because it would take a while to get to the point where I could) that bullets (the gunpowder+shot) might be made accidentally at a metalsmith's forge instead of at an alchemist's laboratory, where they should be made (probably when they've been ordered up using the manager screen or when they've been mandated). Could anyone please tell me if there's a way of preventing this?
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Question about changing the way ammo is crafted
« Reply #1 on: September 27, 2014, 04:27:01 pm »

This is one of those older systems. If you have an AMMO item and it is available to your civilization as ammunition in the entity definitions, the forge will make that item from any metal that has the [ITEM_AMMO] token. Period.

You could prevent it from being known to your civilization, but that'd mean it's a weird exotic thing that wouldn't be available through the usual channels. I'm guessing that bullets made with your own reaction in that case would never appear in trade or in the hands of NPC dwarves, but custom reactions screw with availability in weird ways. That's your best shot, I think.
Logged

Sprocket809

  • Bay Watcher
    • View Profile
Re: Question about changing the way ammo is crafted
« Reply #2 on: September 27, 2014, 05:22:36 pm »

Would making the bullets unknown to dwarves (so they can't forge them) but allowing the reaction to make them work?
By make them work I mean able to be made in fortress mode using the reaction and for other dwarves to be able to make them so I can buy them from traders?
« Last Edit: September 27, 2014, 05:33:23 pm by Sprocket809 »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Question about changing the way ammo is crafted
« Reply #3 on: September 28, 2014, 08:31:54 am »

By make them work I mean able to be made in fortress mode using the reaction and for other dwarves to be able to make them so I can buy them from traders?
If Dwarven traders are allowed to bring them, then you are also allowed to create them directly at a metalsmith's forge. It is impossible to have the former without having the latter.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Sprocket809

  • Bay Watcher
    • View Profile
Re: Question about changing the way ammo is crafted
« Reply #4 on: September 28, 2014, 08:38:12 am »

Right, I'll make it so that they can trade the raw materials for bullets (brimstone, niter and shot). As a roleplay thing, maybe they can't sell fully crafted bullets/gunpowder due to their volatility?
Logged

Bogus

  • Bay Watcher
    • View Profile
Re: Question about changing the way ammo is crafted
« Reply #5 on: September 30, 2014, 05:01:06 pm »

By make them work I mean able to be made in fortress mode using the reaction and for other dwarves to be able to make them so I can buy them from traders?
If Dwarven traders are allowed to bring them, then you are also allowed to create them directly at a metalsmith's forge. It is impossible to have the former without having the latter.

shouldnt they be allowed to make them, and thus bring them,  if they entity has a reaction for it? i made something very similar and i thought i had seen some of those bullets in the caravan.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Question about changing the way ammo is crafted
« Reply #6 on: October 02, 2014, 09:19:34 am »

shouldnt they be allowed to make them, and thus bring them,  if they entity has a reaction for it?
No - only specific types of reactions work for that, namely ones that produce specific metal bars (i.e. smelting ores), specific non-metal bars (for pearlash), and specific powders (for plaster).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.