Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Help with adding custom ranged weapons  (Read 460 times)

dot12321

  • Bay Watcher
    • View Profile
Help with adding custom ranged weapons
« on: November 07, 2009, 11:50:45 pm »

So, I'm trying to implement muskets into DF, just for fun, but I'm confused if this will work:

This is my ammo info:
[ITEM_AMMO:ITEM_AMMO_BULLETS]
[NAME:bullet:bullets]
[CLASS:BULLET]
[DAMAGE:300:PIERCE]

This is my weapon:
[ITEM_WEAPON:ITEM_WEAPON_MUSKET]
[NAME:musket:muskets]
[DAMAGE:100:BLUDGEON]
[WEIGHT:40]
[SKILL:HAMMER]
[RANGED:MUSKET:BULLET]
[TWO_HANDED:0]
[MINIMUM_SIZE:5]
[MATERIAL_SIZE:3]

What I want is for 'bullets' to be made from a custom mineral I made called Sulfur and Iron Bars combined, I want it to produce around 5 bullets.

Here is the Sulfur info in matgloss_stone_mineral:
[MATGLOSS_STONE:SULFUR]
[NAME:sulfur][COLOR:255:255:0][TILE:'*']
[ENVIRONMENT:SEDIMENTARY:CLUSTER:100]
[ITEM_SYMBOL:'®']
[SOLID_DENSITY:500]
[VALUE:100]

Here is where I'm confused in reaction_standard; I don't know how this will turn out, care to help?:
[REACTION:SULFUR_TO_BULLETS]
[NAME:make bullets]
[SMELTER]
[REAGENT:1:STONE:NO_SUBTYPE:STONE:SULFUR]
[REAGENT:1:BAR:NO_SUBTYPE:METAL:IRON]
[PRODUCT:100:1:AMMO:NO_SUBTYPE:AMMO:BULLETS]

Just for your info, I added this:
   [WEAPON:ITEM_WEAPON_MUSKET]
      [AMMO:ITEM_AMMO_BULLETS]
To entity_default for dwarves.
I also added:
   [MUSKETMAN_NAME:musketdwarf:musketdwarves]
To creature_standard, for dwarves.

And that's everything I've done. I know I've got to be missing something here, or something's wrong.

So, will all this work together? If it goes the way I want it to, I want Sulfur to appear in stone, and when mined out, at a Smelter, can be made into 5 bullets (1 sulfur + 1 iron bar = 5 bullets, I want), which are then used in a Musket carried by a Musketdwarf.
Thanks in advance for any help!
Logged

3

  • Bay Watcher
    • View Profile
Re: Help with adding custom ranged weapons
« Reply #1 on: November 08, 2009, 12:02:56 am »

Code: [Select]
[RANGED:MUSKET:BULLET]In the weapon entry needs to be replaced with
Code: [Select]
[RANGED:CROSSBOW:BULLET]as crossbow weapons are the only ones supported by the gui in this version (fixed for bows next version; I don't know if you'll be able to mod in new ranged skills even then).

Code: [Select]
[PRODUCT:100:1:AMMO:NO_SUBTYPE:AMMO:BULLETS]needs to be replaced with
Code: [Select]
[PRODUCT:100:5:AMMO:ITEM_AMMO_BULLETS:STONE:SULFUR](or METAL:IRON, depends on what you want. The sulfur ones will be roughly equivalent to steel in effectiveness. This will produce a stack of 5)

The MUSKETMAN thing won't work, the best you can do is replace CROSSBOWMAN with MUSKETDWARF

Also, sulfur is already in the game under the name of brimstone.
« Last Edit: November 08, 2009, 12:06:26 am by 3 »
Logged

dot12321

  • Bay Watcher
    • View Profile
Re: Help with adding custom ranged weapons
« Reply #2 on: November 08, 2009, 12:29:43 am »

Thanks!
And, I'm just messing around with editing, I just want to get this working so I can get an idea on how modding works.

Oh, and I tested it before I read your reply, and it works, sort of. It required the Hammerman skill to work, but even a fresh recruit slaughtered Antmen with no problem.
« Last Edit: November 08, 2009, 12:33:36 am by dot12321 »
Logged