Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: Jake on May 21, 2011, 01:06:01 pm

Title: Black Powder Firearms
Post by: Jake on May 21, 2011, 01:06:01 pm
Download (http://dffd.bay12games.com/file.php?id=4418)

Installation instructions:

1. Copy the files into your raw/objects folder.

2. Add the following to the civilisation you have set as playable in entity_default.txt:

[PERMITTED_BUILDING:GUN_FORGE]
[PERMITTED_BUILDING:BULLET_MINT]
[PERMITTED_BUILDING:WORK_BENCH]

[PERMITTED_REACTION:FIRELOCK_L]
[PERMITTED_REACTION:FIRELOCK_S]
[PERMITTED_REACTION:SPRINGLOCK_L]
[PERMITTED_REACTION:SPRINGLOCK_S]

[PERMITTED_REACTION:UNBOX1]
[PERMITTED_REACTION:UNBOX2]
[PERMITTED_REACTION:UNBOX3]
[PERMITTED_REACTION:UNBOX4]

[PERMITTED_REACTION:MAKE_BPOWDER_P]
[PERMITTED_REACTION:MAKE_BPOWDER_S]

[PERMITTED_REACTION:CARTRIDGES_L]
[PERMITTED_REACTION:CARTRIDGES_S]
[PERMITTED_REACTION:CARTRIDGES_B1]
[PERMITTED_REACTION:CARTRIDGES_B2]

[PERMITTED_REACTION:LEAD_BULLET_L]
[PERMITTED_REACTION:IRON_BULLET_L]
[PERMITTED_REACTION:COPPER_BULLET_L]
[PERMITTED_REACTION:ANY_BULLET_L]
[PERMITTED_REACTION:LEAD_BULLET_S]
[PERMITTED_REACTION:IRON_BULLET_S]
[PERMITTED_REACTION:COPPER_BULLET_S]
[PERMITTED_REACTION:ANY_BULLET_S]
[PERMITTED_REACTION:LEAD_BUCKSHOT]
[PERMITTED_REACTION:IRON_BUCKSHOT]
[PERMITTED_REACTION:COPPER_BUCKSHOT]
[PERMITTED_REACTION:ANY_BUCKSHOT]
[PERMITTED_REACTION:LEAD_BIRDSHOT]
[PERMITTED_REACTION:IRON_BIRDSHOT]
[PERMITTED_REACTION:COPPER_BIRDSHOT]
[PERMITTED_REACTION:ANY_BIRDSHOT]

[PERMITTED_REACTION:IRON_ROCKET]
[PERMITTED_REACTION:STEEL_ROCKET]
[PERMITTED_REACTION:COPPER_ROCKET]
[PERMITTED_REACTION:WOOD_ROCKET]

[PERMITTED_REACTION:IRON_MUSKET]
[PERMITTED_REACTION:BRONZE_MUSKET]
[PERMITTED_REACTION:STEEL_MUSKET]
[PERMITTED_REACTION:IRON_RIFLE]
[PERMITTED_REACTION:BRONZE_RIFLE]
[PERMITTED_REACTION:STEEL_RIFLE]
[PERMITTED_REACTION:IRON_PISTOL]
[PERMITTED_REACTION:BRONZE_PISTOL]
[PERMITTED_REACTION:STEEL_PISTOL_BLADED]
[PERMITTED_REACTION:IRON_PISTOL_BLADED]
[PERMITTED_REACTION:BRONZE_PISTOL_BLADED]
[PERMITTED_REACTION:STEEL_PISTOL_BLADED]
[PERMITTED_REACTION:COPPER_AIRGUN]
[PERMITTED_REACTION:IRON_AIRGUN]
[PERMITTED_REACTION:BRONZE_AIRGUN]
[PERMITTED_REACTION:STEEL_BBGUN]
[PERMITTED_REACTION:COPPER_BBGUN]
[PERMITTED_REACTION:IRON_BBGUN]
[PERMITTED_REACTION:BRONZE_BBGUN]
[PERMITTED_REACTION:STEEL_BBGUN]
[PERMITTED_REACTION:IRON_CARBINE]
[PERMITTED_REACTION:BRONZE_CARBINE]
[PERMITTED_REACTION:STEEL_CARBINE]
[PERMITTED_REACTION:IRON_BLUNDERBUSS]
[PERMITTED_REACTION:BRONZE_BLUNDERBUSS]
[PERMITTED_REACTION:STEEL_BLUNDERBUSS]
[PERMITTED_REACTION:IRON_SHOTGUN]
[PERMITTED_REACTION:BRONZE_SHOTGUN]
[PERMITTED_REACTION:STEEL_SHOTGUN]
[PERMITTED_REACTION:ROCKET_TUBE]

3. Add some combination of the following to any other civs you want to be armed with guns, and/or buy components from.

[ITEM_WEAPON:ITEM_WEAPON_MUSKET]
[ITEM_WEAPON:ITEM_WEAPON_RIFLE]
   [ITEM_AMMO:ITEM_AMMO_CARTRIDGE_L]a

[ITEM_WEAPON:ITEM_WEAPON_AIRGUN]
   [ITEM_AMMO:ITEM_AMMO_BULLET_L]
   
   [ITEM_WEAPON:ITEM_WEAPON_BBGUN]
   [ITEM_AMMO:ITEM_AMMO_BULLET_S]

[ITEM_WEAPON:ITEM_WEAPON_PISTOL]
[ITEM_WEAPON:ITEM_WEAPON_PISTOL_BLADED]
[ITEM:WEAPON:ITEM_WEAPON_CARBINE]
   [ITEM_AMMO:ITEM_AMMO_CARTRIDGE_S]a

[ITEM_WEAPON:ITEM_WEAPON_ROCKET]
   [ITEM_AMMO:ITEM_AMMO_ROCKET]

[ITEM_WEAPON:ITEM_WEAPON_BLUNDERBUSS]
   [ITEM_AMMO:ITEM_AMMO_SHOT_1]

[ITEM_WEAPON:ITEM_WEAPON_SHOTGUN]
[ITEM_WEAPON:ITEM_WEAPON_SHOTGUN_SAWN_OFF]
   [ITEM_AMMO:ITEM_AMMO_SHOT_2]
   
[PERMITTED_REACTION:MAKE_BPOWDER_P]
[PERMITTED_REACTION:MAKE_BPOWDER_S]
   
[ITEM_TOOL:ITEM_TOOL_BOX_FL_L]b
[ITEM_TOOL:ITEM_TOOL_BOX_FL_S]b
[ITEM_TOOL:ITEM_TOOL_BOX_SL_L]b
[ITEM_TOOL:ITEM_TOOL_BOX_SL_S]b

a. You only need one entry for ammunition if you have more than one weapon that fires the same sort.
b. These are to simplify the process of importing firelocks and spring-locks to maps with no easy access to steel. Please don't use them as an exploit.

______________________________________________________________________________________

How To Use:

   First, a note of caution: This mod does not make bows and crossbows redundant. Getting a firearms industry working is time-consuming and complicated and you'll almost certainly not find all the raw materials you need on one map, so expect to buy a lot of stuff from the caravans.

   There are two main processes involved, making the weapons and making the ammunition. All but one of the necessary reactions involved go on within the three dedicated firearms workshops, meaning that you can put in a work-order for a load of the necessary components and then forget about it while your craftsdwarf's shops, metalsmith's forges and other workshops are unmolested. The exception is gunpowder, which you'll probably only be making intermittently.
   
   To make a gun, you need metal bars, wood and either firelocks or spring-locks. (Barrels, stocks etc are not yet modelled.) The required materials are as follows:
   
   Rifle, Musket, Hand mortar, Fowling piece, Wagon gun                   1 metal bar           1 Large firelock       1 log
   Spring-gun                              1 metal bar*   1 Large spring-lock   1 Log
   Pistol, Bladed pistol, Carbine                     0.5 metal bars   1 Small firelock      1 Log
   Small spring-gun                           0.5 metal bars*   1 Small spring-lock   1 Log
   
   * These weapons can be made out of copper. All others are restricted to iron, bronze or steel.
   
   Note that since DF isn't really set up for using partial metal bars, pistols, carbines and small spring-guns are made in pairs. All these weapons are assembled in the Gunsmith's Forge using Weaponsmithing. The Gunsmith's forge is also where firelocks and spring-locks are made, using Metalcrafting. These can only be made from steel, but one steel bar will create six large or ten small locks of either type.
   
   Firelocks and spring-locks can be bought from the caravans in boxes, which can be opened at the Workbench using the Striking skill. There's a 95% chance you'll get a wooden chest free out of this reaction, but occasionally it'll break. Each box contains six large or ten small locks of the type you bought.
   
   Ammunition is a two-step process, at least for gunpowder arms. The first step is to make a batch of gunstones or buck/birdshot at the Ammunition Mint, using the Metalcrafting labour. These can be made of quite literally any metal, although there are separate reactions for lead, iron and copper. You are strongly advised to set the Ammunition Mint to take from a specific stockpile that accepts only the metals you want made into ammunition if you use the "Make small/large gunstones from any metal" reaction. Either way, you get sixty large or one hundred small gunstones or one "buckshot" or "birdshot" item per bar.
   
   The best metal for ammunition is... Well, whatever you've got, really. Shot made from lead or other mostly-useless metals like tin or zinc will reliably kill or incapacitate through leather, and do significant harm through chain mail; plate armour might give a bit more trouble, but it conveniently leaves the shoulders and upper arms vulnerable so your thin bearded line will only have to get lucky once. Iron and copper bullets are even better.
   
   Gunstones can be fired from spring guns by themselves, but if you want a bit more bang for your dwarfbuck you'll need to combine them with some cloth and a sack of gunpowder at the Workbench with the Clothesmaking skill. (This is a placeholder until paper is implemented in Fortress Mode.) The ratios are as follows:
   
   1 stack of 60 large gunstones              1 stack of 60 large cartridges
   1 stack of 100 small gunstones      1 stack of 100 large cartridges
   3 stacks of 100 small gunstones      1 stack of 50 grapeshot cartridges
   1 Buckshot                  1 stack of 100 buckshot cartridges*
   1 Birdshot                  1 stack of 150 birdshot cartridges*
   
   * These are separate ammunition *types*, but of the same *class*, meaning they can both be fired out of the fowling piece. Not many people know you can do this.
   
   Last of all we have rockets for the hand mortar, which are a slight oddball among the ammunition types. Metal ones are made at the Gunsmith's Forge, wooden ones at the Workbench, with the gunpowder added directly. You only get five per log or bar, but if you need to fire more than five of these at one opponent you're having serious Fun.
   
   As for gunpowder itself, you will require the following: 2 blocks of coal or charcoal, 8 blocks of saltpeter or potash, 1 boulder of brimstone and ten empty bags. This is the only BPFA reaction to take place at the Smelter, using furnace operating; if you have another mod installed that uses the Alchemy skill for something then you may wish to modify the raws accordingly. The Dwarf Chocolate Plugin version of this mod (currently defunct pending DC updating to v0.40) uses the Alchemy skill at the Alchemist's Workshop.
   
   As you will have noticed, gunpowder is a very resource-intensive item to make on-site. Expect to end up buying a lot of it from the caravans, along with ready-made ammunition, and use what you do buy with great care.
   
   As to which firearms are the best? That's largely a matter for opinion. Rifles and muskets are the most powerful conventional firearms, but pistols weigh the least and can be used in conjunction with a shield, and carbines are somewhere in the middle. Spring-guns are significantly less powerful, only a moderate improvement over crossbows, but their ammunition is faster to make and requires no gunpowder. Shotguns are brutally effective for pulping or severing body parts but of very limited use against armour. Hand mortars can reliably incapacitate anything up to some megabeasts, but their ammunition is fearsomely expensive.
   
______________________________________________________________________________________

Known (or suspected) issues:

   Weapons and ammunition only obtainable through reactions don't turn up with caravans, or presumably in the hands of invaders. The only known workaround for this is to add them to entity_default as [WEAPON:ITEM_WEAPON_MUSKET] etc.

   Bullets might occasionally be found stuck in the ground or dead enemies the way arrows or crossbow bolts are, although arena testing suggests that this is quite rare. Material and velocity apparently plays some part in determining how often this happens, but there's not much !!SCIENCE!! on the subject.

   Guns fitted with bayonets can be fitted to upright spear traps, which I suppose is as good a way as any of using up weapons that are surplus to requirements. Guns can also be added to weapon traps and function quite normally, which makes very little sense but can't be helped.
   
   "Individual choice, ranged" creates issues with dwarves picking up the wrong kind of ammunition, which is a known bug in vanilla. I'm not yet certain how this affects hunters, but if you want to use gunstones for training and cartridges for combat, the only method I'm aware of is to set up a separate 'trainee' squad.
   
______________________________________________________________________________________

   Acknowledgements:
   
   Toady One and ThreeToe for creating this wonderful platform for our individual and collective creativity.
   
   Michael_Almeida for letting me use his Muskets mod as the basis for the first version of BPFA.
   
   Hugo the Dwarf, Fredd, Acperience, Meph and many others for their invaluable advice and support.
   
   Everyone who's built on my work to enhance their own mods, mentioned me in their sig or just posted in the thread with a kind word.
Title: Re: Black Powder Firearms
Post by: Fredd on May 21, 2011, 11:38:49 pm
Left out lead for ammo, and potash could be used as a sub for saltpeter. 5k cloth for cartridges, is a little large. For the spring guns, would need steel for the springs, since other materials would be too brittle, low tensile strength
Title: Re: Black Powder Firearms
Post by: Jake on May 22, 2011, 03:36:15 am
Left out lead for ammo, and potash could be used as a sub for saltpeter. 5k cloth for cartridges, is a little large. For the spring guns, would need steel for the springs, since other materials would be too brittle, low tensile strength
Lead ammunition is definitely in the raws; are you sure you didn't leave the reaction out of entity_default by mistake? I'll take your other comments into consideration, but I'm waiting on a bit more feedback before the next version.
Title: Re: Black Powder Firearms
Post by: Rhenaya on May 22, 2011, 05:00:03 am
i have two mods incorporating stuff like this: my alchemists mod (creating loads and loads of saltpeter out of even bigger loads of wood with potash refinery)
and the thunderbluss mod (which basicly does the same as your mod just only one weapon :x)

though to keep thing simpler i only used 1 brimstone/saltpeter/coal per bag, and each bag creates a lot of bullets :x
Title: Re: Black Powder Firearms
Post by: Jake on May 22, 2011, 06:19:28 am
though to keep thing simpler i only used 1 brimstone/saltpeter/coal per bag, and each bag creates a lot of bullets :x
So did the mod I based it on, but I couldn't resist making it more complex. And 120 rounds per sack of gunpowder ought to be plenty once I tweak the reaction a bit. Might go with Fredd's suggestion instead of a reaction to create saltpetre, actually; I don't know if the ashery can accept a custom reaction, and my custom workshop design skills are... lacking, to say the least.
Title: Re: Black Powder Firearms
Post by: Alternatecash on May 24, 2011, 09:51:39 pm
Yes. More and better ways to kill. I approve.
Title: Re: Black Powder Firearms
Post by: Acperience on May 28, 2011, 03:49:18 am
What are the differences between muskets/rifles/air-guns/pistols besides the materials used to create them?
Title: Re: Black Powder Firearms
Post by: Jake on May 28, 2011, 07:43:49 am
Rifles have the highest muzzle velocity but a slightly longer reload time than muskets, but muskets possess spike bayonets. Pistols are quicker to reload but have a lower muzzle velocity than both, but can be used in conjunction with a shield. Spring-guns have a slightly better reload time than a musket and carry bayonets, but are much less powerful.
Title: Re: Black Powder Firearms
Post by: Acperience on May 28, 2011, 10:03:37 am
Rifles have the highest muzzle velocity but a slightly longer reload time than muskets, but muskets possess spike bayonets. Pistols are quicker to reload but have a lower muzzle velocity than both, but can be used in conjunction with a shield. Spring-guns have a slightly better reload time than a musket and carry bayonets, but are much less powerful.

I thought the weapon system was weird to the point of being able to hold several weapons/shields in one hand, but rifles/muskets/spring-guns disallows shield holding?
Title: Re: Black Powder Firearms
Post by: 3 on May 28, 2011, 10:28:07 am
slightly longer reload time than muskets [...] Pistols are quicker to reload

How does this work? I wasn't aware that there were any means of affecting firing speed.
Title: Re: Black Powder Firearms
Post by: Jake on May 28, 2011, 08:49:50 pm
I thought the weapon system was weird to the point of being able to hold several weapons/shields in one hand, but rifles/muskets/spring-guns disallows shield holding?
They're too large for dwarves to hold one-handed; the same size as a longsword in fact. I think that should work properly.

How does this work? I wasn't aware that there were any means of affecting firing speed.
SHOOT_MAXVEL is the tag that governs the reload rate, and SHOOT_FORCE alters muzzle velocity, which is apparently sort of like the force multiplier tag in melee damage. I think.
Title: Re: Black Powder Firearms
Post by: Patchouli on May 29, 2011, 01:09:39 am
Did you test out rifles and other two-handed weapons in fortress mode?

I always thought that ranged weapons needed to be one handed so they could hold ammo in the free hand.

But if not, that's good news.
Title: Re: Black Powder Firearms
Post by: Jake on May 29, 2011, 04:24:19 am
Did you test out rifles and other two-handed weapons in fortress mode?

I always thought that ranged weapons needed to be one handed so they could hold ammo in the free hand.

But if not, that's good news.
I've not yet had an opportunity to test this, I'm afraid. I genned one world with an earlier, horribly broken incarnation of the mod, and only had time to fix the major screwups before going on vacation. I won't have access to my gaming rig for a few weeks.
Title: Re: Black Powder Firearms
Post by: Acperience on May 29, 2011, 03:32:49 pm
Did you test out rifles and other two-handed weapons in fortress mode?

I always thought that ranged weapons needed to be one handed so they could hold ammo in the free hand.

But if not, that's good news.
I've not yet had an opportunity to test this, I'm afraid. I genned one world with an earlier, horribly broken incarnation of the mod, and only had time to fix the major screwups before going on vacation. I won't have access to my gaming rig for a few weeks.

I'm about to gen a world with firearms, what skill affects gun usage?
Title: Re: Black Powder Firearms
Post by: Jake on May 29, 2011, 04:23:51 pm
I'm about to gen a world with firearms, what skill affects gun usage?
Marksdwarf for the ranged attack, and weapons with bayonets use the speardwarf skill whilst the rest use MISCWEAPON.

And I did add a lot of comments to the raws answering most of these questions, you know.
Title: Re: Black Powder Firearms
Post by: Acperience on May 29, 2011, 04:28:32 pm
I'm about to gen a world with firearms, what skill affects gun usage?
Marksdwarf for the ranged attack, and weapons with bayonets use the speardwarf skill whilst the rest use MISCWEAPON.

And I did add a lot of comments to the raws answering most of these questions, you know.

::embarrassed face::

In any case giving the goblins, humans, and white tigermen (from the fortress defense mod) guns doesn't seem to have broken worldgen
Title: Re: Black Powder Firearms
Post by: Jake on May 29, 2011, 06:07:49 pm
It's okay. I shouldn't have assumed that everyone has my habit of skimming the text of a mod before genning a world with it.
Title: Re: Black Powder Firearms
Post by: Acperience on May 29, 2011, 06:16:44 pm
It's okay. I shouldn't have assumed that everyone has my habit of skimming the text of a mod before genning a world with it.

It's damn hard to find a site with saltpeter, embarking on a site now with imported saltpeter.

Is the file on dffd outdated?
changelog says you changed bullets to edge, raw files say they're still blunt.
Title: Re: Black Powder Firearms
Post by: Jake on May 29, 2011, 08:38:22 pm
Oh, bugger. Yes, it probably is; I had to restore a lot of stuff from a backup a few weeks ago and might not have updated everything properly. I'll sort it out as soon as I get a chance.

And you're just going to have to live with importing nearly all your gunpowder until I get around to the potash-to-saltpeter reaction, I'm afraid. I did intend it to be fairly difficult to make.
Title: Re: Black Powder Firearms
Post by: Acperience on May 29, 2011, 08:56:37 pm
I just edited all the blunts to edge in the region and main raws, that'll probably fix that for me.

I also forgot to add the permitted reaction bit to entity_default =x
So I just added that now to the region/main raws too.
I'm assuming it works fine since it lets me build the workbench/mint etc now :P

I like how the workshop sizes are reasonable.
Title: Re: Black Powder Firearms
Post by: omglazers on May 29, 2011, 09:26:16 pm
Im dying to play this, but it'll have to wait for a new world gen unless I can mod it into a save :P
Title: Re: Black Powder Firearms
Post by: Acperience on May 29, 2011, 09:51:44 pm
Im dying to play this, but it'll have to wait for a new world gen unless I can mod it into a save :P

You can mod it in if you place all the required files into your raw folder inside your region save folder.

However the presence of guns won't have affected your worldgen.
Title: Re: Black Powder Firearms
Post by: omglazers on May 29, 2011, 10:04:13 pm

You can mod it in if you place all the required files into your raw folder inside your region save folder.

However the presence of guns won't have affected your worldgen.

I gave up and gave in. I genned a new world  :P

I'm playing with the Genesis mod, so opted to give humans and dwarves full access to guns, steel for dwarves only. Other races got varying types of weapons. The smarter and more industrious received access to the weapons, whereas the dumber and less industrious civilizations and elves received only spring guns.

Also, maybe consider making cannons or siege guns for defense :)

Consider a workshop for dwarves to create urine. The required way to create it is with water or a drink. Make the reaction take forever, to simulate 'aging' perhaps.
Title: Re: Black Powder Firearms
Post by: Jake on May 30, 2011, 06:18:59 am
Cannons are on the list for after siege engines are overhauled, and I'd rather cut out the middleman and make it out of ash and sewer brew; the stuff probably tastes like piss anyway. ;)
Title: Re: Black Powder Firearms
Post by: Acperience on May 30, 2011, 03:32:05 pm
Cannons are on the list for after siege engines are overhauled, and I'd rather cut out the middleman and make it out of ash and sewer brew; the stuff probably tastes like piss anyway. ;)

Imagine a dwarf who's job is dedicated urination.

I'm having a hell of a time getting the gun industry set up, no magma safe blocks to build with :/
Will post results as soon as I can actually MAKE a damn gun.

btw, can you assign bullets like bolts and do they need quivers?
Title: Re: Black Powder Firearms
Post by: Michael_Almeida on May 30, 2011, 06:28:38 pm
I know that my mod was far from perfect to begin with, (huge understatement, I know) specially considering how I still don't know the best way to work with the current damage system. If I may be so bold, I do have some suggestions:

-Originally I was going to have the musket-making reaction use more bars, logs and mechanisms, but produce more weapons to account for the use of flint. I think it was making around 4 of them at once.

-A better work-around would be to create an item (perhaps a tool?) to replace the boulder of flint in the weapon-making reaction, which then can be made in large quantities from a single boulder of flint. Like the gunstones are made, perhaps?

Also if I may, while SHOOT_FORCE does affect damage (as far as I know), SHOOT_MAXVEL affects the actual speed of the projectile, however due to how reloading works (again, I'm not 100% sure of this) anyone firing the weapon cannot start reloading until their projectile hits something, so it does affect reload speed a bit, but for the most part that's really dependant on your dwarf's marksman/misc.weapon skill or even their agility level.

Title: Re: Black Powder Firearms
Post by: Acperience on May 30, 2011, 06:44:16 pm
I know that my mod was far from perfect to begin with, (huge understatement, I know) specially considering how I still don't know the best way to work with the current damage system. If I may be so bold, I do have some suggestions:

-Originally I was going to have the musket-making reaction use more bars, logs and mechanisms, but produce more weapons to account for the use of flint. I think it was making around 4 of them at once.

-A better work-around would be to create an item (perhaps a tool?) to replace the boulder of flint in the weapon-making reaction, which then can be made in large quantities from a single boulder of flint. Like the gunstones are made, perhaps?

Also if I may, while SHOOT_FORCE does affect damage (as far as I know), SHOOT_MAXVEL affects the actual speed of the projectile, however due to how reloading works (again, I'm not 100% sure of this) anyone firing the weapon cannot start reloading until their projectile hits something, so it does affect reload speed a bit, but for the most part that's really dependant on your dwarf's marksman/misc.weapon skill or even their agility level.



Add to your sig, The Titanic is made of people.

Also afaik firing speed does depend on both skill and individual speed (which come partly from agility).
and wasn't flint only in 40d and earlier?
Title: Re: Black Powder Firearms
Post by: Michael_Almeida on May 31, 2011, 10:24:58 am
<DISREGARD THAT I SUCK PLUMP HELMETS>
(...)and wasn't flint only in 40d and earlier?

...Oh right he didn't use that part of my mod, did he?
Nevermind.
Title: Re: Black Powder Firearms
Post by: Acperience on May 31, 2011, 02:01:48 pm
Ok I just started setting up my gun industry.

Apparently Workbenches can be made out of 2 of anything...
So I now have a pig-tail fiber right glove and sheep wool workbench.


Title: Re: Black Powder Firearms
Post by: omglazers on May 31, 2011, 02:10:02 pm
I think tonight I will cheat to speed up gun production and try and test out all the gun functions. I'd really like to try and help this mod get somewhere, because to be frank I like dwarves who are more industrious and steampunk-ish than high fantasy. So I'd love to see a mod that takes dwarves in an industrial direction.
Title: Re: Black Powder Firearms
Post by: Acperience on May 31, 2011, 02:29:22 pm
I think tonight I will cheat to speed up gun production and try and test out all the gun functions. I'd really like to try and help this mod get somewhere, because to be frank I like dwarves who are more industrious and steampunk-ish than high fantasy. So I'd love to see a mod that takes dwarves in an industrial direction.

The gnomes and goblins take offense.
Title: Re: Black Powder Firearms
Post by: omglazers on May 31, 2011, 08:20:28 pm
The gnomes and goblins take offense.

They got firearms too though!
Title: Re: Black Powder Firearms
Post by: Jake on May 31, 2011, 09:11:50 pm
Thanks for the feedback, everyone. I'm currently on vacation and don't have access to my main PC, but I'll be coming out with an update that addresses at least some of your suggestions ASAP.
Title: Re: Black Powder Firearms
Post by: Acperience on May 31, 2011, 11:33:22 pm
Alright, suggestions time!

Gun making seems to take a massive amount fuel, so I created some magma powered workshops to make gunstones and guns.
When making guns, it seems any mechanism will work so I removed the metal mechanism crafting reactions from the gun forge.

HOWEVER, game gave me a
Fatal Error: Missing Reactions Definition, so I reverted everything back :/

A stack of 60 exceptional quality iron gunstones valued at 3000 urist  gets turned into 120 "rock cartridges" valued at 480 urists.
Title: Re: Black Powder Firearms
Post by: Alternatecash on June 02, 2011, 04:11:20 pm
I've had trouble with the rock cartridges as well, with dorfs refusing to stockpile them at all.
Title: Re: Black Powder Firearms
Post by: Acperience on June 03, 2011, 03:24:45 am
Ok I got the magma versions to work.




The magma versions of the gun forge and ammunition mint will appear in the workshops menu after genning a new world and will work like other magma furnaces and not require fuel.

I've had trouble with the rock cartridges as well, with dorfs refusing to stockpile them at all.

At least the bullets show up in the ammunition menu in the military screen :/


Also, just wondering, why did you add making mechanism to the gun forge if normal forges can already make metal mechanisms?
Title: Re: Black Powder Firearms
Post by: Acperience on June 04, 2011, 03:49:24 am
Bullet hits eye........bruises it..........



A recent battle with a simple good quality iron rifle.
I made the cartridges with iron but they show up as "rock"
Spoiler (click to show/hide)


As you can see, a lot of light hits and glancing blows :/
At least my marksdwarf took 120 cartridges with him so ammunition wasn't a problem.
The fight ended after one shot bruised the strangler in the chest and gave him breathing problems. The strangler then promptly ran off the map and escaped.

My dwarf started with zero experience in archery and marksdwarfship ended up firing 35 rounds and gained enough exp to be just a smidge shy of Adequete in the ranged skills.

He was locked in melee about 90% of the time AND he had a shield with him.
He sustained no injuries. Was a proficient dodger and fighter, used the rifle the whole fight.
Title: Re: Black Powder Firearms
Post by: Acperience on June 04, 2011, 07:52:19 am
MOOOOOORE TESTING! :D

I did some tweaking and experimenting in the arena

Pretty much the only thing I added there was a separate named version that needs magma

Here I also removed the need for fuel to make all airguns

Spoiler: Ammo tweaks (click to show/hide)

Bullets made of metals better for cutting fare better than heavy materials.
Ex Iron>Lead etc etc
Gun material only matters for melee, cutting metals are better.

In arena testing:

A proficient marksdwarf/archer with a steel rifle and lead bullets got killed by an elephant starting from 15 tiles
A grand master MD/A with a steel pistol and lead bullets killrf the elephant before it moved 10 tiles. 3 shots to incapacitate about 10 more to finish it off

A team of 10 gunmen with steel rifles/bullets vs a team of 10 crossbowmen with steel crossbows/bolts. 15 tiles apart. All proficient at ranged combat. Each dwarf had 11 ammunition.
-Riflemen won with 7 dead 2 moderately injured 1 heavily injured
-2 crossbowmen were killed in melee

A team of 20 gunmen with steel rifles/bullets vs a team of 20 crossbowmen with steel crossbows/bolts. 15 tiles apart. All proficient at ranged combat. Each dwarf had 11 ammunition.
-Riflemen won with 5 dead 3 lightly injured 6 moderately injured 6 heavily injured
-4 crossbowmen were killed in melee
-1 riflemen was killed in melee

Didn't seem to be any difference in firing speed.
Rifles and muskets CAN be used with a shield



Title: Re: Black Powder Firearms
Post by: Jake on June 04, 2011, 07:50:42 pm
Much obliged, Acperience. If you don't mind, I'll add the magma forges and the tweaked ammo values to the next update. Pistols with daggers attached is historically accurate, at least according to the Valiant Book of Pirates, so I'll throw those in as a separate weapon to the ordinary pistol. Vaguely torn about bayonets for rifles though; it makes perfectly good logical sense but renders muskets a lot less useful.
Title: Re: Black Powder Firearms
Post by: Acperience on June 04, 2011, 09:22:15 pm
Much obliged, Acperience. If you don't mind, I'll add the magma forges and the tweaked ammo values to the next update. Pistols with daggers attached is historically accurate, at least according to the Valiant Book of Pirates, so I'll throw those in as a separate weapon to the ordinary pistol. Vaguely torn about bayonets for rifles though; it makes perfectly good logical sense but renders muskets a lot less useful.

No problem, but I think the bayonets I added to the rifles were pretty crappy. Less than half the penetration value of muskets.

1 other thing is I'm not 100% sure I tagged the airrifles right. I don't know if a reaction can have 2 building tags. DF didn't give me an error, but I haven't tried building them in a new world yet.

Also on the rifles.
It seems in arena mode, dwarves won't equip a rifle with a shield, however in fort mode, they will equip both.
I think this is because in arena mode, the ammunition is held in the offhand whereas in fort mode, quivers take care of that.
Title: Re: Black Powder Firearms
Post by: eddyg86 on June 05, 2011, 07:48:39 am
http://www.bay12forums.com/smf/index.php?topic=74103.0
i released a similar w.i.p concept, we simplified everything however.

good job bud. i'll nitpick thru your job, see if you made any cool progress, my latest build, human city fort, has to have muskets. has to. if they aint got glaives and single steel plate chests, the guards gotta be on the foot in a feathered hat with a musket. and the captains all gotta have pistols. lol...
Title: Re: Black Powder Firearms
Post by: Jake on June 05, 2011, 11:00:07 am
It seems in arena mode, dwarves won't equip a rifle with a shield, however in fort mode, they will equip both.
I think this is because in arena mode, the ammunition is held in the offhand whereas in fort mode, quivers take care of that.

I think that's a bug on Toady's end, judging by the number of posts I've seen about dwarves carrying three swords and a shield at once etc. The rock bullets are probably an error in the reaction somewhere, though for the life of me I can't think where. I'll look it over, and if I can't find it I'll just make separate reactions for each metal.

Oh,  by the way, when did metal mechanisms get reintroduced? I made this mod when I was still on .31.18.
Title: Re: Black Powder Firearms
Post by: Acperience on June 05, 2011, 04:54:11 pm
It seems in arena mode, dwarves won't equip a rifle with a shield, however in fort mode, they will equip both.
I think this is because in arena mode, the ammunition is held in the offhand whereas in fort mode, quivers take care of that.

I think that's a bug on Toady's end, judging by the number of posts I've seen about dwarves carrying three swords and a shield at once etc. The rock bullets are probably an error in the reaction somewhere, though for the life of me I can't think where. I'll look it over, and if I can't find it I'll just make separate reactions for each metal.

Oh,  by the way, when did metal mechanisms get reintroduced? I made this mod when I was still on .31.18.

I think they've existed since I started playing in .31.15
I usually don't use metal for mechanisms so I don't know for sure.
Title: Re: Black Powder Firearms
Post by: Jake on June 05, 2011, 05:33:38 pm
Me neither. I never even noticed they were available!
Title: Re: Black Powder Firearms
Post by: Acperience on June 23, 2011, 12:11:04 am
I've been playing Dead Frontier more than DF lately :P. Still keeping track of where this is headed though.

Maybe the future syndromes will allow for tranquilizer darts.
Title: Re: Black Powder Firearms
Post by: Jake on June 23, 2011, 12:13:21 am
Good timing there, mate...

v0.4 is up, featuring a gunpowder-from-potash reaction, the assorted weapon and ammo tweaks suggested by Acperience and a slightly modified reaction for making cartridges. Thanks to unforseen circumstances upon which I shall enlarge when it's not 1AM, I will be without a DF-capable computer for the next few months, so I'm afraid the playtesting is all on you folks.

Also, there's a minor error in the installation instructions in the readme file: the corect version can be found in the top post.
Title: Re: Black Powder Firearms
Post by: Jake on June 25, 2011, 01:20:45 am
Thanks to unforseen circumstances upon which I shall enlarge when it's not 1AM, I will be without a DF-capable computer for the next few months...
Or not, as it turns out. 43 FPS on embark is good enough to be getting on with, so I'll try and nail some of the bugs with the workshops. I'm also going to experiment with ceramic ammunition, at least for spring-guns.

After that is the next big development: Rockets. This is where I depart somewhat from actual history, though the use of rockets as artillery is older than you might think. Absent support for throwing weapons in fortress mode, I'm aiming for something that resembles a Renaissance-era gunsmith's attempt at an M79. I've got these mostly worked out in my head, but I'd be interested in some recommendations from you folks before I kick off.
Title: Re: Black Powder Firearms
Post by: Acperience on June 25, 2011, 01:44:30 am
Thanks to unforseen circumstances upon which I shall enlarge when it's not 1AM, I will be without a DF-capable computer for the next few months...
Or not, as it turns out. 43 FPS on embark is good enough to be getting on with, so I'll try and nail some of the bugs with the workshops. I'm also going to experiment with ceramic ammunition, at least for spring-guns.

After that is the next big development: Rockets. This is where I depart somewhat from actual history, though the use of rockets as artillery is older than you might think. Absent support for throwing weapons in fortress mode, I'm aiming for something that resembles a Renaissance-era gunsmith's attempt at an M79. I've got these mostly worked out in my head, but I'd be interested in some recommendations from you folks before I kick off.

For experimenting with ceramic ammo, you might want to consider creating a new type of material, paired with a new reaction that creates the material.

The edge damage setup used for gunstones and cartridges relies on the cutting properties of the bullet material. I have no idea what the properties are for porcelain or clay goods, but I doubt Toady created them with ceramic ammunition in mind.

Perhaps tie the reaction to the alchemy skill.
I think maybe gunpowder creation should be changed to alchemy as well.

How do you plan on creating the grenade effect for the m79?
I have no idea on how you would start, but having a dragonfire or magma mist effect would be interesting.
Title: Re: Black Powder Firearms
Post by: Jake on June 25, 2011, 02:14:33 am
For experimenting with ceramic ammo, you might want to consider creating a new type of material, paired with a new reaction that creates the material.

The edge damage setup used for gunstones and cartridges relies on the cutting properties of the bullet material. I have no idea what the properties are for porcelain or clay goods, but I doubt Toady created them with ceramic ammunition in mind.
They're supposed to be the equivalent of bone bolts in vanilla, ie alright for training or hunting small game but only deployed in combat if you're really desperate, but duly noted.

Quote
I think maybe gunpowder creation should be changed to alchemy as well.
That's on hold until either alchemy is used for something in vanilla DF or importing a particular material in bulk is less hassle. Remember how irritating it was to get glassmakers on a map with no sand back in 40d?

Quote
How do you plan on creating the grenade effect for the m79?
I have no idea on how you would start, but having a dragonfire or magma mist effect would be interesting.
Much as I'd like to, I'm not going for an explosion effect, but more of an armour-piercing one. More details in the morning.
Title: Re: Black Powder Firearms
Post by: Acperience on June 25, 2011, 02:24:32 am
For experimenting with ceramic ammo, you might want to consider creating a new type of material, paired with a new reaction that creates the material.

The edge damage setup used for gunstones and cartridges relies on the cutting properties of the bullet material. I have no idea what the properties are for porcelain or clay goods, but I doubt Toady created them with ceramic ammunition in mind.
They're supposed to be the equivalent of bone bolts in vanilla, ie alright for training or hunting small game but only deployed in combat if you're really desperate, but duly noted.

If only for training purposes, what about wax bullets?
Title: Re: Black Powder Firearms
Post by: Jake on June 25, 2011, 12:02:32 pm
Wax would be a clever way of making genuine blank rounds, but realistically, bullets made from it probably wouldn't even make it out of the barrel before they disintegrated. Ceramic ones should at least be capable of hitting a target.
Title: Re: Black Powder Firearms
Post by: Acperience on June 25, 2011, 01:47:28 pm
Wax would be a clever way of making genuine blank rounds, but realistically, bullets made from it probably wouldn't even make it out of the barrel before they disintegrated. Ceramic ones should at least be capable of hitting a target.

Actually wax rounds are used in real life military training. It can be stopped by something as simple as plywood, but they do make it out of the barrel and hit with more force than a paintball.
Title: Re: Black Powder Firearms
Post by: Jake on June 25, 2011, 02:09:46 pm
That's news to me; the army prefer to use blanks and the MILES system in this country, less chance of accidental injuries. Anyway, I'll look into it. Wax bullets might be useful as less-lethals for the fortress guard as well as practice rounds, but I'm not sure ordinary beeswax in a black-powder musket would be as successful.
Title: Re: Black Powder Firearms
Post by: Acperience on June 25, 2011, 02:17:03 pm
That's news to me; the army prefer to use blanks and the MILES system in this country, less chance of accidental injuries. Anyway, I'll look into it. Wax bullets might be useful as less-lethals for the fortress guard as well as practice rounds, but I'm not sure ordinary beeswax in a black-powder musket would be as successful.

It's actually paraffin wax they use.
Title: Re: Black Powder Firearms
Post by: UristMcHuman on June 29, 2011, 04:13:31 pm
If spring guns are less powerful than all other guns, are they still powerful enough to be used for hunting? And I think that the bayonet on a musket should be a removable secondary item.
Title: Re: Black Powder Firearms
Post by: Jake on June 29, 2011, 05:20:16 pm
If spring guns are less powerful than all other guns, are they still powerful enough to be used for hunting? And I think that the bayonet on a musket should be a removable secondary item.
They should be more than adequately lethal against game, or against hostiles who aren't wearing armour. Unfortunately hunters seem to be hard-coded to use crossbows at the moment. There mayt or may not be workarounds for this but I haven't begun to test that yet.
And detachable bayonets would be nice, but it's not possible within the limits of the game engine.
Title: Re: Black Powder Firearms
Post by: Jake on July 07, 2011, 10:03:43 am
Minor bugfix too small to justify uploading a new version:

Title: Re: Black Powder Firearms
Post by: Jake on August 05, 2011, 02:31:34 pm
Version 0.6 has been uploaded, hopefully squashing that mysterious "rock cartridges" bug and rather belatedly adding Acperience's magma buildings and the appropriate reactions... which I totally neglected to mention anywhere in the readme file on account of being in too much of a hurry to get the release out.

Bugger.

Oh, well, I'll sort it out later. Also, see the update to Known Issues in the top post.
Title: Re: Black Powder Firearms
Post by: Savoyard on September 01, 2011, 05:52:49 pm
I know I'm bumping an old topic, but is it possible to implement different ammo for the musket and airgun? They should be using blunt ball ammo and should make lead more useful than it is now for ammo material.



Oh and cannons for the siege operator...
Title: Re: Black Powder Firearms
Post by: Seriyu on September 01, 2011, 05:54:09 pm
Siege engines in general cannot be modified unfortunatly.
Title: Re: Black Powder Firearms
Post by: Acperience on September 01, 2011, 06:10:14 pm
I know I'm bumping an old topic, but is it possible to implement different ammo for the musket and airgun? They should be using blunt ball ammo and should make lead more useful than it is now for ammo material.



Oh and cannons for the siege operator...

Unfortunately blunt weapon type doesn't work very well in projectiles. You can tweak the contact area and velocity modifiers of the bullets to be more like hammers but from what I've experimented with, blunt ammo always does glancing blows and minor bruising.
Title: Re: Black Powder Firearms
Post by: Jake on September 01, 2011, 11:28:57 pm
I know I'm bumping an old topic, but is it possible to implement different ammo for the musket and airgun? They should be using blunt ball ammo and should make lead more useful than it is now for ammo material.
I experimented with a BLUNT tag for musket shot in an earlier version, and I'm sorry to say it's not currently possible to make it realistic; unless I increase the contact area to an improbable size it's completely ineffectual no matter how much I crank up the impact speed.

And apologies to everyone for the lack of activity of late, I'm in the process of moving to another country and haven't had a lot of time for playing DF, let alone modding it.
Title: Re: Black Powder Firearms
Post by: Deon on September 02, 2011, 02:24:48 am
I would say it backwards :P.

Modding > playing. ::)
Title: Re: Black Powder Firearms
Post by: scotch208 on September 30, 2011, 01:22:10 pm
Seeing silver bullets and pistols in this mod got me exited to go werewolf hunting in the next version.
Title: Re: Black Powder Firearms
Post by: megahelmet on October 13, 2011, 02:51:55 pm
I've been playing with this and I noticed some things and had some questions.

1. Cartridges are made with clothesmaking. (Merely being stated for everyone else who didn't know....took me forever to find that one out)

1.5 Cartridges also won't store in ammo piles even though bullet parts do. They also show up as 'rock cartridges' even though I make them with steel. Is this a cosmetic flaw? I haven't had much luck actually killing things as those rock cartridges seem to be deflected pretty easily, but this could be a problem with the lowskill of my dwarves. Also, making cartridges only require 1 cloth instead of 1000.

2. Spring guns. Do they use the minted amunition instead of cartridges?

3. Magma forges and mints. I found in this thread to get them to work they have to be added to the entity_default. This was left out of the main post I saw. Also, the regular gunbench makes bladed pistols while the magma forge only makes non-bladed pistol varieties.

4. Can't make weapons from the shop itself. For whatever reason, the reactions to make any of the weapons are red and I cannot choose them even though I have all the mats. I found that by making a job order for pistols they got made. Note that forging metal mechanisms from the shop works fine.
Title: Re: Black Powder Firearms
Post by: Jake on October 13, 2011, 09:04:23 pm
I've been playing with this and I noticed some things and had some questions.

1. Cartridges are made with clothesmaking. (Merely being stated for everyone else who didn't know....took me forever to find that one out)

1.5 Cartridges also won't store in ammo piles even though bullet parts do. They also show up as 'rock cartridges' even though I make them with steel. Is this a cosmetic flaw? I haven't had much luck actually killing things as those rock cartridges seem to be deflected pretty easily, but this could be a problem with the lowskill of my dwarves. Also, making cartridges only require 1 cloth instead of 1000.
Sod it. Sorry about that, I thought I'd fixed the "rock cartridges" bug. Can you dig out the error logs?

Quote
2. Spring guns. Do they use the minted amunition instead of cartridges?
Yes.

Quote
3. Magma forges and mints. I found in this thread to get them to work they have to be added to the entity_default. This was left out of the main post I saw. Also, the regular gunbench makes bladed pistols while the magma forge only makes non-bladed pistol varieties.
Oops. Thanks for the heads up, I'll edit the front page as well as add bladed pistols to the list of reactions for magma workshops.[/quote]

Quote
4. Can't make weapons from the shop itself. For whatever reason, the reactions to make any of the weapons are red and I cannot choose them even though I have all the mats. I found that by making a job order for pistols they got made. Note that forging metal mechanisms from the shop works fine.
Huh. That's weird. Again, let take a look at the error log and I'll see if I can figure out where I've screwed up.
Title: Re: Black Powder Firearms
Post by: megahelmet on October 13, 2011, 10:39:10 pm
Here's my error log. http://www.filedropper.com/errorlog

I didn't know that an errorlog existed till I started to look for it.

I like this mod though, I'm working on a whole team of steel spring gun-dorfs. Fire steel gunstones then close for melee. I like bayonnets better than just bashing things with the crossbow.
Title: Re: Black Powder Firearms
Post by: Jake on October 14, 2011, 12:06:23 am
Aha! Mystery solved; I used GET_MATGLOSS_FROM_REAGENT when I should have used GET_MATERIAL_FROM_REAGENT. I must have forgotten to upload the fixed version, because I know someone pointed that out in the thread for the other mod in my signature.

I'll sort that and the missing reaction from magma gunmith's forges out as soon as I get my creative mojo back up and running.
Title: Re: Black Powder Firearms
Post by: UristMcHuman on November 24, 2011, 08:05:43 pm
A few weeks ago, I actually made my own firearms, though they were based on more 'modern' (i.e. from the 1890s onward) guns, like .45 caliber revolvers, .30-06 battle rifles, .50cal sniper rifles, etc. but I suppose I could make them into more historically accurate weapons.




Sorry about this, I know this thread is somewhat old.
Title: Re: Black Powder Firearms
Post by: Jake on November 24, 2011, 09:06:09 pm
Not at all. I've been meaning to get back to this, but getting married, moving to another country and a bunch of other stuff has been getting in the way.

And help yourself to whatever bits of the code you think work better than what you came up with for the modern firearms; I was going to put together a version with metallic cartridges anyway.
Title: Re: Black Powder Firearms
Post by: UristMcHuman on November 24, 2011, 09:50:46 pm
UPDATE: I actually converted my 'modern' guns (and damn, there were a lot) to more historically accurate, albeit later-developed firearms. I.e. matchlock muskets, flintlock pistols, blunderbusses, etc. I'll post the raws for each gun and their respective ammo tomorrow.
Title: Re: Black Powder Firearms
Post by: UristMcHuman on November 25, 2011, 02:27:01 pm
Alrighty then, I've got my guns ready to be posted up here. Here they are:
Spoiler: Matchlock Firearms (click to show/hide)
Spoiler: Flintlock Firearms (click to show/hide)
Sorry. I'm testing and fixing them now. I'll get back to them later.
Title: Re: Black Powder Firearms
Post by: Jake on January 20, 2012, 10:59:06 am
Aaaaand it's back! Featuring separate pistol ammunition and a brand new weapon: Rockets! The rocket tube can only be made of steel and it takes a whole sack of gunpowder to make just five rockets, but one hit can reliably dismember or decapitate an unarmoured humanoid.
Title: Re: Black Powder Firearms
Post by: Alternatecash on January 20, 2012, 01:16:24 pm
I'll get this again when the next version is up. The rockets should make a good addition to my anti-elf measures.
Title: Re: Black Powder Firearms
Post by: Spiderking50 on January 22, 2012, 08:05:29 pm
Sorry if this is a bit random, but, i tried using your mod and i am having trouble getting my guys to shoot the muskets and pistols im giving them. For some reason i couldn't them to even carry ammo, but upon a little fiddling i got it, but they still wont load the guns and just chase after everything waving their bayonettes in the air. What should i do?
Title: Re: Black Powder Firearms
Post by: Jake on January 22, 2012, 09:03:15 pm
Sorry if this is a bit random, but, i tried using your mod and i am having trouble getting my guys to shoot the muskets and pistols im giving them. For some reason i couldn't them to even carry ammo, but upon a little fiddling i got it, but they still wont load the guns and just chase after everything waving their bayonettes in the air. What should i do?
Hmmm. Have you made sure they're set to use their cartridges for training and combat in the military screen? And I suggest arming them with either a musket or a pistol rather than one of each; it might be confusing the AI as to what they're meant to be shooting with.
Title: Re: Black Powder Firearms
Post by: Spiderking50 on January 22, 2012, 09:35:32 pm
Thats what i did, i tryied on two seperate occasions to use them individually. They are set for both training and combat. The guy just puts a few into his quiver and runs after them until he gets close enough to stab them.
Title: Re: Black Powder Firearms
Post by: Meph on January 22, 2012, 09:40:44 pm
Hi,

I currently have a poll running in my modthread, about what people wish for the next update. Historic weapons are leading :)

I wanted to ask, if I could add this to my mod, with proper credit of course. I would remove the rockets and the workbench, but otherwise leave it as it is.

EDIT: On a different note: Your permitted reactions in the first post are wrong. You call the bullets there LEAD_BULLET_S and LEAD_BULLET_L for example, and the reactions in the reaction file are called: LEAD_BULLET and LEAD_BULLET2
Title: Re: Black Powder Firearms
Post by: Jake on January 23, 2012, 12:14:40 am
Hi,

I currently have a poll running in my modthread, about what people wish for the next update. Historic weapons are leading :)

I wanted to ask, if I could add this to my mod, with proper credit of course. I would remove the rockets and the workbench, but otherwise leave it as it is.
Go right ahead. But be sure to emphasise the fact that it's derived from another mod in turn. As for the workbench, I may just follow your lead on that. It was originally going to be used for a lot more reactions in a separate mod that never made it past the planning stage, and it's a bit redundant now.

Quote
EDIT: On a different note: Your permitted reactions in the first post are wrong. You call the bullets there LEAD_BULLET_S and LEAD_BULLET_L for example, and the reactions in the reaction file are called: LEAD_BULLET and LEAD_BULLET2
Oops. Thanks for the heads up, I'll edit the first post accordingly.
Title: Re: Black Powder Firearms
Post by: ink_runner on February 28, 2012, 07:47:10 pm
Hi! is this mod compatible with DF2012?

Apologies in advance if the question sounds far too noob, I've always played vanilla :)
Title: Re: Black Powder Firearms
Post by: Jake on February 28, 2012, 08:24:12 pm
Hi! is this mod compatible with DF2012?

Apologies in advance if the question sounds far too noob, I've always played vanilla :)

I'm afraid I haven't tested it yet, lacking a machine that can generate a decent-sized world in the latest version, but to the best of my knowledge there's no reason it shouldn't be.

You might want to hold off for a day or two, though, because I'm in the process of tidying up the raws a bit; it turns out magma reactions are duplicated needlessly, and I'm currently debating the future of the Workbench.
Title: Re: Black Powder Firearms
Post by: Jake on March 10, 2012, 07:42:56 am
Okay, the next update is pretty much ready to go. The biggest change is that separate reactions for magma-powered workshops are now gone, but I've added a couple of new weapons that are mostly flavour and fixed a rather strange oversight; if anyone was having trouble with the reaction to create pistols, I must have somehow overwritten them by mistake when I copied and pasted to create bladed pistols.

I'm still doing some final bugfix and balance testing, and in the meantime I'd appreciate some input on the Workbench. Meph removed it when he integrated this mod into his Masterwork one, and I'm debating doing the same. My personal preference is to keep it, however; one of the things that's always vaguely annoyed me about ammunition production is that there's no way to put in a work-order for, say, thirty stacks of wooden bolts without it getting in the way of producing stone crafts and the like. A workshop that's only useful for two reactions nevertheless strikes me as a bit redundant.

So, what do you all think?
Title: Re: Black Powder Firearms
Post by: Meph on March 12, 2012, 06:16:02 pm
A note: My main reason for removing it is that my mod is really, really big. I have about 70 buildings in total, so adding 6 new ones for one features is too much. Users even asked about merging the Ammunition Mint and the Gunsmith into one, to bring down the building count by another 2.

I have nothing against the generell idea of the workbench.
Title: Re: Black Powder Firearms
Post by: Dohon on April 28, 2012, 03:54:40 am
Just found this thread again. Perhaps some very late feedback, but, I don't mind the workbench either. In my mind, it can be a very complex process. But the more work you have to do to get the final result, the more rewarding the result should be. As long as the guns do enough damage to justify the work needed to get a gun, I'm all up for more complexity. I would even welcome it. :)
Title: Re: Black Powder Firearms
Post by: Jake on April 28, 2012, 04:34:45 am
Well, in that case, I'm leaving it in for the time being.

The latest update is now more or less complete, awaiting only compatibility testing with 0.34.07 that shall commence just as soon as the RAM I ordered turns up. The biggest change is that reactions for conventional and magma-based workshops have been combined and generally tidied up, and there are also two new weapons. The carbine fires the same ammunition as the pistol, has a muzzle velocity roughly halfway between it and the musket but requires two hands to aim. The small spring-gun (ITEM_WEAPON_BBGUN in the raws) is basically its gunpowder-free equivalent, and exists only because I suspect that adding [AMMO:ITEM_AMMO_WHATEVER] to a civ in entity_default without something to fire the ammunition from might create glitches.
Title: Re: Black Powder Firearms
Post by: andyman564 on May 01, 2012, 01:09:37 pm
hey I've been using this mod for a while, and it's great! though i just recently added the appropriate tokens to the  "entity_default" file to make guns + ammo non-foreign. (older version with rockets added in, so only one cartridge size)

Code: [Select]

        [WEAPON:ITEM_WEAPON_MUSKET]
[WEAPON:ITEM_WEAPON_RIFLE]
[WEAPON:ITEM_WEAPON_PISTOL]
[WEAPON:ITEM_WEAPON_PISTOL_BLADED]
[AMMO:ITEM_AMMO_CARTRIDGE]
[WEAPON:ITEM_WEAPON_AIRGUN]
[AMMO:ITEM_AMMO_BULLET]
[WEAPON:ITEM_WEAPON_ROCKET_TUBE]
[AMMO:ITEM_AMMO_ROCKET]

the result is me being able to create bone cartridges and gunstones from the crafters shop, without the need for gunpowder. not sure what's happening here, just thought I'd mention it.
Title: Re: Black Powder Firearms
Post by: Jake on May 01, 2012, 02:24:51 pm
That's because you're supposed to add the individual weapons and ammunition to entity_default for other civs so you can trade for them. Your civ is supposed to do it the hard way, through [PERMITTED_REACTION:IRON_MUSKET] etc, etc.

Speaking of reactions, is anyone else having trouble with the one for making gunpowder from potash in 34.07? I keep getting an error message in the logfile about an unidentified material token or something, but further testing is slightly complicated by the fact that worldgen currently takes about an hour and a half when it doesn't simply hang. My three year-old nephew learned a number of new words when my first successfully generated world turned out to be unusable thanks to the game reading a leftover autosave file labelled "item_weapon.txt~" as well as item_weapon.txt!

Arena testing went okay, though; the carbine kills or badly woulds unarmoured opponents in the first hit but chainmail is enough to reduce the damage to severe bruising and sometimes internal injury.
Title: Re: Black Powder Firearms
Post by: Buoyancy on May 01, 2012, 04:48:44 pm
To speed world generation up for testing, just make pocket worlds with a 5 year long history.
Title: Re: Black Powder Firearms
Post by: Jake on May 04, 2012, 09:57:01 am
Acting on Bouyancy's excellent advice, I now have a test world generated... And the ammunition mint has no reactions available, training axes are mysteriously non-existent, and I can apparently order muskets from the outpost liaison as a training weapon. Oh, and splints and crutches now require three bars of metal each.

Clearly there's still some work to do.
Title: Re: Black Powder Firearms
Post by: Jake on May 24, 2012, 10:41:02 pm
Quick progress update, if you can call it that. The reactions for creating gunstones just plain don't work in .34.09; I can order them made in the manager screen, but they don't show up in the ammunition mint's task list, and nothing in the error log even hints at why. Cartridges are also broken, with a load of Unrecognised Item Token errors. Here's the complete text of the error log along with the relevant parts of reaction_guns.txt from the unreleased new version, maybe you guys can figure out where I'm going wrong. (I've not got as far as testing the gunpowder reaction in this version, but I seem to be able to buy it from the caravans alright and it appears in the task list for the smelter.)

Spoiler: Error Log (click to show/hide)

Spoiler: Raw File (click to show/hide)

Arena testing threw up an interesting fact, by the way; the carbine is superior to the pistol against opponents in chainmail, but at a slight disadvantage versus plate because the pistol can be reloaded faster. I've not really tested different ammunition materials too thoroughly, but my impression from these tests was that lesser metals would work better as pistol ammunition, because the higher rate of fire increases the likelihood of getting lucky and hitting bare flesh.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on May 26, 2012, 10:42:11 am
Saw your question in the [MODDING] Reactions, I'll have a look (BTW the gunpowder 10000 is alot of gunpowder (PRODUCT_DIMENSION multipies product amount) donno if your goal was 66/67 things of gunpowerder or you acaully want 10000 made)

Also I have gunpowder making in Regen, not as indepth as yours tho.

EDIT:

Errors with CARTRIDGES L and S
Spoiler (click to show/hide)

EDIT2:
all your rocket reactions have the same issue as your CARTRIDGES

EDIT3:
all your gunpowder reactions make an insane amount of gunpower and the reagent that takes bags remove "bag" and all should be well

for future ref reagents go like this
[REAGENT:<custom id>:<amount #>:<ITEM TYPE>:<ITEM SUB-TYPE>:<MATERIAL>:<MATERIAL SUB-TYPE>]
Title: Re: Black Powder Firearms
Post by: Jake on May 26, 2012, 10:56:18 am
BTW ... the gunpowder 10000 is alot of gunpowder (PRODUCT_DIMENSION multipies product amount) donno if your goal was 66/67 things of gunpowerder or you acaully want 10000 made.


It was only supposed to make ten bags of it, and each bag should have been enough for ten stacks of cartridges.

Anyway, thanks for the help. I think I can fix it now. I also think I've got the ammunition issue sussed as well now; Find/Replace screwed up more stuff than I'd realised.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on May 26, 2012, 10:59:48 am
Also with the lines
[REAGENT:D:1000:CLOTH:MATGLOSS_PLANT:NONE] Placeholder until paper arrives in vanilla.

try

[REAGENT:D:1000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]

EDIT:
When I first looked through your raws I was going by the Errorlog and was looking for what caused them, now taking a second look at the CARTRIDGE making reactions I saw that the cloth usage was a bit off.
Title: Re: Black Powder Firearms
Post by: Jake on May 26, 2012, 11:02:06 am
Hugo, I owe you a beer. And a mention in the credits, because this is at least on a par with Acperience's contribution.

Sincerest thanks!
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on May 26, 2012, 11:08:52 am
You are welcome.

At least are raws where easy to read and straight foward :P
Title: Re: Black Powder Firearms
Post by: sackhead on May 29, 2012, 12:01:54 am
looking forward to the release loved this mod for 31.25
Title: Re: Black Powder Firearms
Post by: Jake on May 29, 2012, 11:58:45 am
looking forward to the release loved this mod for 31.25

Glad to hear it. Unfortunately, testing has been somewhat held up by a minor logistical issue.


The good news is, I think I've figured out a method of making shotgun ammunition that sort of works.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on May 29, 2012, 12:05:56 pm
Ammo with more then one type of attack? and that is crappy living settings. Worse then mine when I got to goto college (single room with the bed and everything else only a single isle to walk down, if you move the computer chair.) It's cheap so i'm happy with it
Title: Re: Black Powder Firearms
Post by: Jake on May 29, 2012, 12:52:01 pm
Ammo with more then one type of attack?

Is that actually possible? I was planning to multiply the EDGE dimension of a small gunstone by six, divide the penetration depth by the same amount and reduce the SHOOT_FORCE.

Quote
and that is crappy living settings. Worse then mine when I got to go to college...

It's not so bad actually: I've got access to a shared kitchen and living room and my room itself is actually quite big. It's just that this house is a hundred years old and mains electricity was an afterthought.
Title: Re: Black Powder Firearms
Post by: GenJeFT on May 29, 2012, 07:05:15 pm
Does this work with the latest version of dwarf fortress?
Title: Re: Black Powder Firearms
Post by: Jake on May 29, 2012, 07:36:10 pm
Does this work with the latest version of dwarf fortress?

Right now it doesn't really work with any version, unless you want to copy and paste Hugo's amended raws manually. Give me about a week?
Title: Re: Black Powder Firearms
Post by: sackhead on May 29, 2012, 10:44:11 pm
if you nead any help with testing im happy to help
Title: Re: Black Powder Firearms
Post by: GenJeFT on May 30, 2012, 10:26:01 am
I can wait, I have been to busy to play the game much lately anyway.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 02, 2012, 06:13:33 pm
May I ask if I can use your guns in Regen?
Title: Re: Black Powder Firearms
Post by: Jake on June 03, 2012, 12:11:18 pm
Okay, new version's out. Rather hastily thrown together, I'm afraid; I've been ill for the past few days and haven't managed to even run the new release through worldgen yet, but I did promise I'd have something ready by now.

And help yourself, Hugo, it's the least I owe you for getting the mod to actually work. (Or at least I hope so...)
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 03, 2012, 12:12:39 pm
hey thanks, and if you have any other problems, I'm sure to keep an eye out so I can help  :P

I will probally tweak some weapons and leave others out (rockets? lol)
Title: Re: Black Powder Firearms
Post by: Jake on June 03, 2012, 12:28:57 pm
Fine by me; the rockets aren't as historically inaccurate as you might think (http://en.wikipedia.org/wiki/Hand_mortar) but they're primarily a placeholder until the siege weapon overhaul happens and I can incorporate cannons.

Oh, and fair warning everyone: The next release is going to take advantage of the new stockpile settings to keep the list of reactions in the ammunition mints at a manageable length, so I can no longer guarantee perfect backwards compatibility as far as the 2010 release. I'm going to leave in separate reactions for iron, copper and lead gunstones and replace the rest with a reaction to make them from any metal, so you'll have to use the stockpile settings for more fine control.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 03, 2012, 12:42:49 pm
I think from looking at it I want only the Rifle and Pistol haha.

But ammo in Regen is only copper (mass produce rounds) or Lead. since Lead doesnt get much love, I just like thinking my dwarves are making cheesy one liners like "Eat Lead!" or "Have some copper coated candy"
Title: Re: Black Powder Firearms
Post by: GenJeFT on June 05, 2012, 01:05:07 pm
Is it just me or is anyone else having problems with FPS using this mod? My game is running at 10FPS with only 30 dwards using this mod. Usualy I have up to 250 dwarfs and I still get a minimum of 30 FPS.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 05, 2012, 01:06:51 pm
Hmm... I'm going to unpack a fresh version of DF34.11 and install BPFA.
I shall look into this

Edit:
errorlog
*** Error(s) found in the file "raw/objects/entity_default.txt"
MOUNTAIN:Unrecognized Entity Token: PERMITTED _REACTION
MOUNTAIN:Unrecognized Entity Token: PERMITTED _REACTION
*** Error(s) finalizing the reaction CARTRIDGES_L
Unrecognized Inorganic Token: NO_SUBTYPE
Unrecognized Inorganic Token: GET_MATERIAL_FROM_REAGANT
*** Error(s) finalizing the reaction CARTRIDGES_S
Unrecognized Inorganic Token: NO_SUBTYPE
Unrecognized Inorganic Token: GET_MATERIAL_FROM_REAGANT
*** Error(s) finalizing the reaction WOOD_ROCKET
WOOD_ROCKET:Unrecognized Item Token: 1

Which I fixed, altho the PERMITTED_REACTION is an error from the main page of the DL. Something I can't fix.

EDIT2:
Lets play with 7 dwarves, seems fine (well of course eh?)
And I don't think I will try and get to 30 dwarves, so I won't be able to hunt down that lag.

EDIT3:
Fixed the two reaction errors

[PERMITTED_REACTION:COPPER_AIRGUN]
[PERMITTED_REACTION:COPPER_BBGUN]

there was a "space" between "PERMITTED" and "_" causing the issue.


Spoiler: Permitted entity items (click to show/hide)

That lag issue is still unknown to me, because BPFA doesn't add too much.
Title: Re: Black Powder Firearms
Post by: GenJeFT on June 05, 2012, 01:34:59 pm
I found 4 of those permitted reaction errors. Fixed them all. Going to test again.

I am still on .10 not .11.
Title: Re: Black Powder Firearms
Post by: GenJeFT on June 05, 2012, 01:43:42 pm
Those errors are not the cause of the lag. Still only in the 10FPS range. I am going to try a different map, I started on a volcano and I think the never ending lava flows might be part of the problem. I think a cavern is filling with lava somewhere because of the volcano.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 05, 2012, 01:55:39 pm
better start digging to make sure, cause yeah flowing lava/water is a killer
Title: Re: Black Powder Firearms
Post by: GenJeFT on June 05, 2012, 02:09:19 pm
Are there programs to find out that don't require me to actually take the time digging at 10FPS? That's going to take forever.

There is also 1 volcano and at least three other full lava tubes. Not to mention the giant pits I found (only in the 1st cavern layer).

So I think that the volcano has the lava at a specific point, and all the lava tubes and pits are filling to that level. But I would need to dig all the way to the 3rd cavern layer to confirm that, at 10fps.

Maybe I should for !!SCIENCE!!.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 05, 2012, 02:13:13 pm
Haha checkout DFHack, I think it has a REVEAL tool
Title: Re: Black Powder Firearms
Post by: GenJeFT on June 05, 2012, 02:22:37 pm
I think I will give it a try. I found Brimstone on the surface of the map. No digging required. Perfect for making gunpowder.

How hard is it to find brimstone usually anyway? I am starting next to volcanoes for obvious reasons, usually volcanoes have lots of sulfur (aka brimstone).
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 05, 2012, 02:27:11 pm
I have trouble finding brimstone and saltpeter, good thing potash is a suitable replacement for saltpeter
Title: Re: Black Powder Firearms
Post by: Jake on June 05, 2012, 04:03:31 pm
Thanks Hugo. Sorry 'bout that, everyone, but the good news is you can copy and paste the fixed reactions straight into the raws without running worldgen again.

I'll update the download and fix those typos in the instructions as soon as I stop feeling like my head's stuffed with warm cotton wool, after which I'm going to start working on the next update, in which the shotgun should be making its début.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 05, 2012, 04:06:15 pm
you welcome jake. Your gunpowder making reactions should be 10X more effective now, while still producing the same amount.

Besides, If i'm butchering your mod I might as well lend a helping hand every now and then :P
Title: Re: Black Powder Firearms
Post by: GenJeFT on June 05, 2012, 05:05:20 pm
Using DF Hack I revealed the map.

A massive 8 lava tubes under ground, and what look like 8 doors to hell. Whats probably draining the FPS is the massive number of demons under my fort.

"edit"

I did the reveal hell command... there are 500 demons under my fort. That's why I have massive lag issues causing 10FPS.

Which sucks, there's lots of brimstone on this map.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 05, 2012, 05:21:31 pm
demons are only generated once hell is breached. Maybe you just got bad luck with this one.

What are other ways of getting sulfer?
Title: Re: Black Powder Firearms
Post by: GenJeFT on June 05, 2012, 05:35:40 pm
Hell has somehow been breached.

There are 525 demons and demon related creatures on this map.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 05, 2012, 05:36:55 pm
reveal hell does that. unless you unreveal before you unpause. But if they where there already.. that would explain your lag (dur lol like I need to say that)
Title: Re: Black Powder Firearms
Post by: GenJeFT on June 05, 2012, 05:46:15 pm
I unrevealed before unpause. I loaded the game, and did the unreveal, never unpaused the game. 525 demon or demon related creatures already there. So its breached somehow. Maybe I can edit them out somehow.
Title: Re: Black Powder Firearms
Post by: Jake on June 07, 2012, 04:55:48 am
A small teaser for the next update...

Code: [Select]
[REACTION:ARMED_BLAG]
[NAME:saw off shotgun]
[BUILDING:GUN_FORGE:NONE]
[BUILDING:GUN_MAGMA:NONE]
[REAGENT:A:1:WEAPON:ITEM_WEAPON:SHOTGUN:METAL:NONE]
[PRODUCT:95:1:WEAPON:ITEM_WEAPON:SHOTGUN_SAWN_OFF:METAL:GET_MATERIAL_FROM_REAGENT:A]
[SKILL:FORGE_WEAPON]
[ADVENTURE_MODE_ENABLED]
Title: Re: Black Powder Firearms
Post by: Jake on June 08, 2012, 09:47:26 pm
And v0.8 is released. Fully integrates Hugo's fixes, slims down the task list in the Ammunition Mints and introduces a new weapon: The shotgun. I haven't arena-tested it yet (I've accumulated so much junk on my desk that I can't actually see my gaming rig's keyboard right now) so let me know what you think.
Title: Re: Black Powder Firearms
Post by: simonthedwarf on June 12, 2012, 03:21:18 pm
My ammunition mint has no reactions?
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 12, 2012, 05:43:06 pm
Did you enable the reactions in the entity?
Title: Re: Black Powder Firearms
Post by: Jake on June 13, 2012, 12:25:52 am
My bad, my bad, Armok-damned Find & Replace fails me again. Let me grab a cup of coffee and I'll upload a fixed version. Sorry guys.

Okay, sorted. Shouldn't need a new worldgen, just copy and paste the modified reaction file.
Title: Re: Black Powder Firearms
Post by: simonthedwarf on June 13, 2012, 05:42:49 am
How are rockets modeled in this game? Do they actually have AoE?

If not, here is how you should do it. Make the rocket set the target on fire - but also change it's body material type to booze. :P
Title: Re: Black Powder Firearms
Post by: Jake on June 13, 2012, 06:23:04 am
How are rockets modeled in this game? Do they actually have AoE?

If not, here is how you should do it. Make the rocket set the target on fire - but also change it's body material type to booze. :P

Interesting idea, but not terribly practical, I'm afraid; I have enough trouble getting modded-in conventional weapons to work. BPFA's rockets are simple hollow metal or wooden projectiles with a sharpened tip, designed for use against megabeasts.
Title: Re: Black Powder Firearms
Post by: Ebullient on June 14, 2012, 07:55:09 am
Adding some feedback/reports:

1. items_ammo_guns.txt - the class for buckshot should be CLASS:BUCKSHOT instead of CLASS:BULLET_S
2. reactions_guns.txt - for any metal gunstones, cartridges, and sawn-off shotgun reaction, I think there's no need for the METAL tag before GET_MATERIAL_FROM_REAGENT. The errorlog says Unrecognized Inorganic Token: GET_MATERIAL_FROM_REAGENT before, removing it should fix it.

The fixed reactions:
Code: [Select]
[REACTION:ANY_BULLET_L]
[NAME:make large gunstones (any metal)]
[BUILDING:BULLET_MINT:NONE]
[BUILDING:BULLET_MAGMA:NONE]
[REAGENT:A:150:BAR:NONE:INORGANIC:NONE][REACTION_CLASS:METAL]
[PRODUCT:100:60:AMMO:ITEM_AMMO_BULLET_L:GET_MATERIAL_FROM_REAGENT:A:NONE]
[FUEL]
[SKILL:METALCRAFT]

[REACTION:ANY_BULLET_S]
[NAME:make small gunstones (any metal)]
[BUILDING:BULLET_MINT:NONE]
[BUILDING:BULLET_MAGMA:NONE]
[REAGENT:A:150:BAR:NONE:INORGANIC:NONE][REACTION_CLASS:METAL]
[PRODUCT:100:60:AMMO:ITEM_AMMO_BULLET_S:GET_MATERIAL_FROM_REAGENT:A:NONE]
[FUEL]
[SKILL:METALCRAFT]

[REACTION:CARTRIDGES_L]
[NAME:prepare large cartridges]
[BUILDING:WORK_BENCH:NONE]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:60:AMMO:ITEM_AMMO_BULLET_L:NONE:NONE]
[REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
[REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:powder][PRESERVE_REAGENT]
[REAGENT:D:1000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]
[PRODUCT:100:60:AMMO:ITEM_AMMO_CARTRIDGE_L:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
[ADVENTURE_MODE_ENABLED]

[REACTION:CARTRIDGES_S]
[NAME:prepare small cartridges]
[BUILDING:WORK_BENCH:NONE]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:60:AMMO:ITEM_AMMO_BULLET_S:NONE:NONE]
[REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
[REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:powder][PRESERVE_REAGENT]
[REAGENT:D:1000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]
[PRODUCT:100:60:AMMO:ITEM_AMMO_CARTRIDGE_S:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
[ADVENTURE_MODE_ENABLED]

[REACTION:CARTRIDGES_B]
[NAME:prepare buckshot cartridges]
[BUILDING:WORK_BENCH:NONE]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:180:AMMO:ITEM_AMMO_BULLET_S:NONE:NONE]
[REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
[REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:powder][PRESERVE_REAGENT]
[REAGENT:D:2000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]
[PRODUCT:100:30:AMMO:ITEM_AMMO_BUCKSHOT:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
[ADVENTURE_MODE_ENABLED]

[REACTION:ARMED_BLAG]
[NAME:saw off shotgun]
[BUILDING:GUN_FORGE:NONE]
[BUILDING:GUN_MAGMA:NONE]
[REAGENT:A:1:WEAPON:ITEM_WEAPON_SHOTGUN:METAL:NONE]
[PRODUCT:95:1:WEAPON:ITEM_WEAPON_SHOTGUN_SAWN_OFF:GET_MATERIAL_FROM_REAGENT:A]
[SKILL:FORGE_WEAPON]
[ADVENTURE_MODE_ENABLED]

Oh, and I should say, great mod! The goblins will love their new shotguns.   :)
Title: Re: Black Powder Firearms
Post by: Jake on June 14, 2012, 08:35:36 am
Adding some feedback/reports:

1. items_ammo_guns.txt - the class for buckshot should be CLASS:BUCKSHOT instead of CLASS:BULLET_S
2. reactions_guns.txt - for any metal gunstones, cartridges, and sawn-off shotgun reaction, I think there's no need for the METAL tag before GET_MATERIAL_FROM_REAGENT. The errorlog says Unrecognized Inorganic Token: GET_MATERIAL_FROM_REAGENT before, removing it should fix it.

Thanks for the heads-up, I'll sort them out and fire off another update later this afternoon. And then I'm going to excavate the keyboard of my gaming rig, hook up the second wireless antenna I finally got around to picking up in Maplin's and start doing proper testing again.

Okay, the new version's up. Shouldn't need a new worldgen either.

Quote
Oh, and I should say, great mod! The goblins will love their new shotguns. :)

Glad you appreciate it. I don't recommend adding the sawn-off shotgun as a reaction in Fortress Mode, by the way; it's intended as an adventurer weapon. Shame we can't do armed robberies yet, really...
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 20, 2012, 12:23:04 am
Grabbing this new version for my mod, Hopefully I find no bugs ;) Also as a suggestion, can the PERMITTED_REACTIONS be in a .txt that is bundled with the mod?
Title: Re: Black Powder Firearms
Post by: Jake on June 20, 2012, 01:13:00 am
I'm not sure what the advantage is compared to copying and pasting from the DFFD page or the first post in this thread, but if you think it'd be helpful it can be arranged easily enough.
Title: Re: Black Powder Firearms
Post by: Dunamisdeos on June 20, 2012, 02:12:36 am
If you want to make it so that you arent using a whole boulder per flint, just make a workshop reaction that takes a boulder and makes a few flint chips.
Title: Re: Black Powder Firearms
Post by: Jake on June 21, 2012, 08:25:48 am
That'd work. Not quite sure what skill I'd use for it though; stone crafter, probably. Hmmm... I have some ideas for this, but I'm not sure whether they're possible in-engine. Does [PRODUCT_DIMENSION:n] apply to boulders? The wiki's entry on quantities is rather vague.
Title: Re: Black Powder Firearms
Post by: Tierre on June 21, 2012, 09:23:05 am
Just make 50 flints form a boulder:) Best is the enemy of good - that is a good russian proverb. You will use a lot of time and in the end will make boulder do a lot of flints but with 50 reactions instead of 1:)
Title: Re: Black Powder Firearms
Post by: Jake on June 21, 2012, 09:45:04 am
Just make 50 flints form a boulder:) Best is the enemy of good - that is a good russian proverb. You will use a lot of time and in the end will make boulder do a lot of flints but with 50 reactions instead of 1 :)

Yes, it is a good proverb, but I wasn't planning to make just one flint chip per reaction. I'm thinking batches of up to ten per 150th of a boulder, each with its own individual drop probability so you have to factor in a smallish safety margin when importing flint.
Title: Re: Black Powder Firearms
Post by: Dunamisdeos on June 21, 2012, 12:16:13 pm
I'm not an expert on reactions. But it does seem the best way to gof or something like that.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 21, 2012, 12:49:54 pm
Well boulders are heavy as sin, so ordering flint you might get 5 boulders at max. Maybe a new tool could be made called "Box of Flints" can be made out of anything, since it is a box. of course a stone box is weird. And if enabled for your civ (TOOL) then you can make these boxes at a craftshop, so maybe other civs use it?

Anyways you trade for these lighter but more expensive boxes of flint, have a reaction the takes a box and make 3-7 flints.

Donno just a suggestion.
Title: Re: Black Powder Firearms
Post by: Jake on June 21, 2012, 01:29:15 pm
Well boulders are heavy as sin, so ordering flint you might get 5 boulders at max. Maybe a new tool could be made called "Box of Flints" can be made out of anything, since it is a box. of course a stone box is weird. And if enabled for your civ (TOOL) then you can make these boxes at a craftshop, so maybe other civs use it?

Anyways you trade for these lighter but more expensive boxes of flint, have a reaction the takes a box and make 3-7 flints.

Donno just a suggestion.

Innovative, but it feels a bit too contrived to me, especially since a single boulder of flint taken on embark would be enough to make a lot of guns; I haven't decided exactly how many flints you'll get per boulder, but it's going to be a three-figure sum.

How about this: The individual flint strikers are used as part of a reaction to make a firelock, which is used in the gun reactions in place of a metal mechanism and takes... Hmmm. Between a quarter and a third of a metal bar each, depending on the size of the weapon? Firelocks can be bought from caravans if there's no flint on the map, as well as complete weapons.
Title: Re: Black Powder Firearms
Post by: Skald on June 21, 2012, 02:30:53 pm
I love the mod, but I'm still having problems getting it to fully function properly.

The biggest problem I'm having is ammo, specifically cartridges. They show up as "Rock" projectiles, regardless of the stones made.

Any thoughts for how I can fix that?
Title: Re: Black Powder Firearms
Post by: Jake on June 21, 2012, 02:35:59 pm
I love the mod, but I'm still having problems getting it to fully function properly.

The biggest problem I'm having is ammo, specifically cartridges. They show up as "Rock" projectiles, regardless of the stones made.

Any thoughts for how I can fix that?

Oh, sod a dog, this bug again? I thought I fixed that one about half a dozen versions ago. I'll look into it, just let me finish banging my head against the nearest handy wall.
Title: Re: Black Powder Firearms
Post by: Tierre on June 22, 2012, 01:34:18 am
Protect your head Jake:) About crates-  you can do it MasterWork Mod way:) Meph uses sopa bars called crates (for the purpose of easy finding and not using it in any reactions) with AUTOMATIC reactions to unload them. You will need to make a new material template and a creature for this (arena_restricted) and it will let you use it and assign any value to crate you want:)
Title: Re: Black Powder Firearms
Post by: Jake on June 22, 2012, 03:39:21 am
Protect your head Jake :) About crates-  you can do it MasterWork Mod way :) Meph uses sopa bars called crates (for the purpose of easy finding and not using it in any reactions) with AUTOMATIC reactions to unload them. You will need to make a new material template and a creature for this (arena_restricted) and it will let you use it and assign any value to crate you want:)

I dunno, it just feels too much like a hack to me, not to mention all the potential bugs and general weirdness it would create.

I tell you what, though. If you or anyone else fancies putting a "box up flints"/"unbox flints" reaction together once I get the next version out, I'll include it in the .zip file as a sort of optional extra.
Title: Re: Black Powder Firearms
Post by: Tierre on June 22, 2012, 05:02:51 am
[REACTION:CRATE_FLINT]
   [NAME:Open crate of flints]
   [BUILDING:!somebuilding!:!some custom key!]
   [REAGENT:A:1:BAR:NONE:CREATURE_MAT:FLINT_CRATE:SOAP][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
        [PRODUCT:100:10:!!your flints in right material tokens!!][PRODUCT_DIMENSION:!right product dimension!]
   [AUTOMATIC]

For crate you would need a creature:
[CREATURE:FLINT_CRATE]
   [NAME:::]
   [USE_MATERIAL_TEMPLATE:SOAP:FLINT_CRATE_TEMPLATE]
      [STATE_NAME_ADJ:ALL_SOLID:crate of flints]
      [STATE_NAME_ADJ:LIQUID:crate of melted flints]
      [STATE_NAME_ADJ:GAS:crate of boiling flints]
      [PREFIX:NONE]
      [MATERIAL_VALUE:!200!]determine crate value for trade
   [ARENA_RESTRICTED]
   [DOES_NOT_EXIST]

Now add this material template:
Spoiler (click to show/hide)

Now add reaction for entity crate production to dwarves or humans - your choice:

[REACTION:CREATE_FLINT_CRATE]
   [NAME:creating flint crates]
[PRODUCT:100:1:BAR:NONE:CREATURE_MAT:FLINT_CRATE:SOAP][PRODUCT_DIMENSION:150]

It should work without building - this is the mechanic of the game. That is if you add it to dwarves. If you add it to other civs feel free to add a building it is used in - but if oyu do it for dwarf entity - then your fortress will be able to spawn crates. But building is not required.

Don't forget to add entity eraction permissions.

Well that's it.
Title: Re: Black Powder Firearms
Post by: Teh Barple on June 22, 2012, 07:37:34 am
Hey, loving this mod so far but I can't seem to get it to work in Adventure mode. I put in the raws into the entity_default and tabbed all of them in properly but the guns aren't appearing properly, and whenever I spawn with high crossbow skill I start with a crossbow instead of a rifle/musket/whatever. Hopefully this isn't a dumb question to you or isn't overly obvious.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 22, 2012, 09:34:31 am
@Tierre
these creature lines

   [ARENA_RESTRICTED]
   [DOES_NOT_EXIST]
does not exist will remove them from the arena aswell. So ARENA_RESTRICTED is redundant. Just sayin :P

Hrm.. if the creature's SOAP material why is it using a custom template? would it not have a soap_template?

@Teh Barple
In adv. mode? Yea it's funny like that, it randomly picks a weapon of that given skill. High sword skills might give you a short sword, long sword, or a 2-hander. As an example. Nothing to do with the Mod
Title: Re: Black Powder Firearms
Post by: Tierre on June 22, 2012, 09:41:14 am
Hugo - that's from Meph's RAWS:) And for that matter this template has no SOAP_LEVEL 2 and [SOAP] which should protect it from being used in hospital. Good to know about arena_restricted.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 22, 2012, 09:55:02 am
Hugo - that's from Meph's RAWS:) And for that matter this template has no SOAP_LEVEL 2 and [SOAP] which should protect it from being used in hospital. Good to know about arena_restricted.
Ha that explains it, also this should work aswell:

   [USE_MATERIAL_TEMPLATE:FLINT:SOIL_TEMPLATE]
      [STATE_NAME_ADJ:ALL_SOLID:crate of flints]
      [STATE_NAME_ADJ:LIQUID:magma]
      [STATE_NAME_ADJ:GAS:smoke]
      [PREFIX:NONE]
      [MATERIAL_VALUE:!200!]determine crate value for trade
      [SOAP]

This not only should reduce the need of a custom material_template, and still have the same desired effect.
Title: Re: Black Powder Firearms
Post by: Tierre on June 22, 2012, 09:55:45 am
I need to repost this at MW mod thread:) Thanks a lot.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 22, 2012, 10:18:50 am
It's a theory and I believe it should work.

Also Jake I'm going to look into this "Stone ammo" Issue if you don't find it first. I have the newest DL.

Skald what version of this mod are you using?
Title: Re: Black Powder Firearms
Post by: Teh Barple on June 22, 2012, 10:27:57 am

@Teh Barple
In adv. mode? Yea it's funny like that, it randomly picks a weapon of that given skill. High sword skills might give you a short sword, long sword, or a 2-hander. As an example. Nothing to do with the Mod

thanks
Title: Re: Black Powder Firearms
Post by: Jake on June 22, 2012, 02:00:53 pm
Also Jake I'm going to look into this "Stone ammo" Issue if you don't find it first. I have the newest DL.

Skald what version of this mod are you using?

Thanks. I'm dealing with a whole bunch of extremely messy personal stuff right now, so I've not got much time, energy or patience to spare for BPFA. I'll do my best to get something done over the next few weeks though.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 22, 2012, 02:08:41 pm
Hey no problem. Skald could be using a older version, as I see no way how stone ammo is being made... I've scanned the raws.
Title: Re: Black Powder Firearms
Post by: Skald on June 23, 2012, 01:17:37 am
I'm using whatever version is currently up for download.

A larger explanation would be that when I go to the ammo mint, only two options are listed (Small and Large Cart), which are listed as "Rock" cartridges. Upon making such cartridges, they fire off "Rock" projectiles.

No other cart. options are listed :|

Somewhat stumped.
Title: Re: Black Powder Firearms
Post by: Jake on June 23, 2012, 02:18:53 am
I bet it's that bloody [GET_MATERIAL_FROM_REAGENT] tag again. And what the hell are the cartridge reactions doing there in the first place? Arrrrgh.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 23, 2012, 12:15:22 pm
Re-downloading And going to look into Cart.. Making

I am curious as why there are 2 [ADVENTURE_MODE_ENABLED] in these reactions.
Code: [Select]
[REACTION:CARTRIDGES_L]
[NAME:prepare large cartridges]
[BUILDING:WORK_BENCH:NONE]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:60:AMMO:ITEM_AMMO_BULLET_L:NONE:NONE]
[REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
[REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:powder][PRESERVE_REAGENT]
[REAGENT:D:1000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]
[PRODUCT:100:60:AMMO:ITEM_AMMO_CARTRIDGE_L:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
[ADVENTURE_MODE_ENABLED]

[REACTION:CARTRIDGES_S]
[NAME:prepare small cartridges]
[BUILDING:WORK_BENCH:NONE]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:60:AMMO:ITEM_AMMO_BULLET_S:NONE:NONE]
[REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
[REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:powder][PRESERVE_REAGENT]
[REAGENT:D:1000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]
[PRODUCT:100:60:AMMO:ITEM_AMMO_CARTRIDGE_S:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
[ADVENTURE_MODE_ENABLED]

Other then that these reactions are fine, however

Wait you said ammo mint? you must have installed it wrong... altho the thing is, how are you getting even a mis-installed reaction to work at all. Since making cart.s is stage 2 of ammo making.
Title: Re: Black Powder Firearms
Post by: Jake on June 23, 2012, 12:57:24 pm
I am curious as why there are 2 [ADVENTURE_MODE_ENABLED] in these reactions.
Because I wasn't paying attention, that's why. I think I just gave myself a black eye from facepalming too hard.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 23, 2012, 01:03:42 pm
2 [ADV_MODE] tags shouldn't kill the neighbourhood, as dupe tags use the last one mentioned.

Altho to tell the truth I only grabbed the Rifle and Pistol from this Mod and used my own ammo making reaction

Code: [Select]
[REACTION:MAKE_BULLETS]
[NAME:make box of bullets]
[BUILDING:AMMO_REGEN:NONE]
[REAGENT:copper:150:BAR:NONE:INORGANIC:COPPER]
[REAGENT:lead:150:BAR:NONE:INORGANIC:LEAD]
[REAGENT:gunpowder:150:POWDER_MISC:NONE:NONE:NONE][REACTION_CLASS:GUNPOWDER]
[REAGENT:gunpowder container:1:NONE:NONE:NONE:NONE]
[CONTAINS:gunpowder]
[NOT_IMPROVED]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:50:AMMO:ITEM_AMMO_BULLET:INORGANIC:COPPER_LEAD]
[SKILL:FORGE_WEAPON]
Title: Re: Black Powder Firearms
Post by: Skald on June 23, 2012, 01:13:57 pm
Oh well, so I'll remove the bits from the Gun mod and try again.

Anything I should note? Beyond the obvious "Give the dwarves the reaction permission, buildings, weapons, etc".
Title: Re: Black Powder Firearms
Post by: optimusjamie on June 23, 2012, 01:44:25 pm
How do I get guns in Adventurer mode?
Title: Re: Black Powder Firearms
Post by: kingofthescots on June 24, 2012, 06:53:06 pm
I've been having trouble finding deposits of brimstone in the worlds I generate (just unlucky I think). What do you think about an alternate process to produce sulphur, say from cobaltite? Maybe have the reaction done at the smelter, use 10 boulders to produce 2 brimstone, a small chance of iron/nickel, and a poison gas released to simulate arsenic poisoning.

Say along the lines of this:
[REACTION:COBALT_TO_SULPHUR]
[NAME:make sulphur from cobaltite]
[BUILDING:SMELTER:NONE]
[REAGENT:A:10:METAL_ORE:COBALTITE]
[PRODUCT:100:2:BOULDER:NO_SUBTYPE:METAL_ORE:BRIMSTONE]
[FUEL]
[SKILL:SMELT]
Title: Re: Black Powder Firearms
Post by: UristMcWanderer on June 24, 2012, 09:38:11 pm
Say along the lines of this:
[REACTION:COBALT_TO_SULPHUR]
[NAME:make sulphur from cobaltite]
[BUILDING:SMELTER:NONE]
[REAGENT:A:10:METAL_ORE:COBALTITE]
[PRODUCT:100:2:BOULDER:NO_SUBTYPE:METAL_ORE:BRIMSTONE]
[FUEL]
[SKILL:SMELT]
Cobaltite isn't an ore of anything in vanilla, although I have made it an ore of nickel with a 10% chance for iron before.
Title: Re: Black Powder Firearms
Post by: Jake on June 25, 2012, 02:04:17 am
If you know of an ore of sulphur that exists in real life and could plausibly be smelted with 15th century technology I'll be glad to include it, but I'd prefer not to make gunpowder too easy to manufacture; a musket ball is near-guaranteed to mortally wound an unarmoured opponent with the first hit and will break ribs and cause internal injuries through plate armour, and I don't want to turn BPFA into an Easy Mode mod.
Title: Re: Black Powder Firearms
Post by: Skald on June 28, 2012, 04:27:11 pm
So having removed what files/reactions I had put in from the first attempt of using this mod and starting from fresh, I experimented around again and met with failure. On a couple fronts this time...

1. When attempting to make a rifle from the gun workshop, steel mechanisms don't actually take steel to make (it just takes a coal, for some odd reason, even though there was a pile of steel bars right next to it...) and attempting to make a steel rifle required "Rock Mechanisms".

2. The ammo-mint doesn't have any of the reactions taking place at it. Upon consulting the raws it appears that the bullet mint is listed as
[BUILDING_WORKSHOP:BULLET_MINT] but the reaction to make bullets is set to take place at [BUILDING:BULLET_L_MINT:NONE] [BUILDING:BULLET_L_MAGMA:NONE].

So, beyond the obvious of fixing the reactions to take place at the bullet mint, what else am I missing here?
Title: Re: Black Powder Firearms
Post by: Jake on June 28, 2012, 04:44:12 pm
I'm pretty sure it's that duplicate [ADVENTURE_MODE_ENABLED] tag. I really ought to get around to fixing that...

*le sigh* I'll take a look as soon as I get done arguing with the housing office tomorrow.
Title: Re: Black Powder Firearms
Post by: Jake on June 30, 2012, 11:15:50 am
Okay, taking a cue from Dwarf Chocolate, I've reformatted the ammunition reactions somewhat so that they look like this:
[PRODUCT:100:1:AMMO:ITEM_AMMO_WHATEVER:METAL:WHATEVER][PRODUCT_DIMENSION:n]
I haven't tested it yet, but I think this should finally make ammunition reactions work properly.

And these are the new tools:
Code: [Select]
[ITEM_TOOL:ITEM_TOOL_FIRELOCK_L]
[NAME:large firelock:large firelocks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_FIRELOCK_S]
[NAME:small firelock:small firelocks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_SPRINGLOCK_L]
[NAME:large spring-lock:large spring-locks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_SPRINGLOCK_S]
[NAME:small spring-lock:small spring-locks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_FLINT]
[NAME:flint striker:flint strikers]
[VALUE:1]
[TILE:.]
[SIZE:1]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

These should be fairly self-explanatory. I'm not going to make gun barrels a separate item for the time being; that will come once there's a good way to control how much fuel a reaction uses. Unless it meets with overwhelming protest, firelocks and spring-locks are going to be made exclusively from steel, but by way of compensation you'll get several (five, maybe?) to a bar.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on June 30, 2012, 12:16:24 pm
[PRODUCT:100:1:AMMO:ITEM_AMMO_WHATEVER:METAL:WHATEVER][PRODUCT_DIMENSION:n]
well techinically this will work, a bit weird using [PRODUCT_DIMENSION:n] to fill the role of how much is produced
where as
[PRODUCT:100:n:AMMO:ITEM_AMMO_<AMMO_NAME>:INORGANIC:<METAL_NAME>] --- where the "1" is now "n" to signify how big of a stack you want

you can even use
[PRODUCT:100:n:AMMO:ITEM_AMMO_<AMMO_NAME>:GET_MATERIAL_FROM_REAGENT:<reagent id>:NONE] --- the <reagent id> would be the reagent of the desired metal like:
[REAGENT:iron bar:150:BAR:NONE:INORGANIC:IRON] --- one iron bar, the above product's <reagent id> would = "iron bar" lacking quotes of course.

also don't forget you can do:
[PRODUCT:100:50:AMMO:ITEM_AMMO_<AMMO_NAME>:INORGANIC:<METAL_NAME>]
[PRODUCT:100:50:AMMO:ITEM_AMMO_<AMMO_NAME>:INORGANIC:<METAL_NAME>]

to make 2 stacks of 50 AMMO

Title: Re: Black Powder Firearms
Post by: Jake on June 30, 2012, 04:26:25 pm
It's really just an experiment, because I can't think of anything that would cause all those bugs that Skald was complaining of and I was frankly starting to get a little desperate.
Title: Re: Black Powder Firearms
Post by: Jake on July 05, 2012, 07:08:47 am
O...kay. Hit a bit of a snag, folks. I'm either going to have to make it possible to buy firelocks and spring-locks made from any weapons-grade metal, or make them impossible to import at all.
Title: Re: Black Powder Firearms
Post by: Skald on July 05, 2012, 12:09:59 pm
Maybe have it that only a few races have the technology and really aren't open to sharing?

If not, do the former.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on July 05, 2012, 12:13:42 pm
ever thought of just allowing it to be made via custom reactions, or that tradeabled bar of soap idea?

TOOL_FLINT_LOCK
^^^No entity has it permitted so no "[TOOL:ITEM_TOOL_FLINTLOCK]" ^^^

Custom reaction to make the flintlock

Bar of Soap

trade for a "flintlock wrapped in water-proof cloth" in which you unwrap it with a custom reaction.
Title: Re: Black Powder Firearms
Post by: Jake on July 05, 2012, 01:13:42 pm
Custom reactions to produce weapons or ammunition don't work "off-screen", I already discovered that back around v0.6. I could do something with a reaction to create an item in a package of some sort, though; Deon managed something similar with the salvage crate mechanic in his Wasteland mod,  but that strikes me as being too easy to exploit and too difficult to balance.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on July 05, 2012, 01:33:34 pm
Custom reactions to produce weapons or ammunition don't work "off-screen", I already discovered that back around v0.6. I could do something with a reaction to create an item in a package of some sort, though; Deon managed something similar with the salvage crate mechanic in his Wasteland mod,  but that strikes me as being too easy to exploit and too difficult to balance.
Well acaully it's kinda not much of an exploit if you think about it. if you make this inorganic really expensive and only avaiable for trade by using:

Code: [Select]
[REACTION:FLINT_LOCK_TRADE_EMBARK_ONLY]
[PRODUCT:100:1:BAR:NONE:INORGANIC:FLINT_LOCK_WRAPPED]

Code: [Select]
[INORGANIC:FLINT_LOCK_WRAPPED]
[USE_MATERIAL_TEMPLATE:SOIL_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:packaged flintlock]
[DISPLAY_COLOR:7:7:0]
[MATERIAL_VALUE:100] --- Or whatever price you want might have to be tweaked for desired results
[SOAP] --- classes as Misc. Other in embark and trading (also won't be used as SOAP due to lacking a soap_level)
[SOLID_DENSITY:1] --- super light for trading purposes

enable the above reaction for any entity you wish to trade/sell packaged flintlocks

A custom one has to be made to unpackage the flintlock, allowing you full control of what material comes out.

EDIT:
Note the inorganic was just pulled out of a hat, no testing done. But Meph and a few other modders use this concept so it should work
Title: Re: Black Powder Firearms
Post by: Jake on July 05, 2012, 04:23:03 pm
That would require me to understand the material properties tokens, and I'm already out of my depth just tinkering with weapons, ammo and reactions. It also... Well, I just plain don't like that kind of thing. I don't really know why, it just bothers me.

Anyway, the option I was considering -reluctantly- was a reaction where n firelocks and a wooden chest were combined into another entry in item_tool_guns, which could only be made of wood. Another reaction at the workbench would then un-box them leaving a chest that could then be reused as furniture.
Title: Re: Black Powder Firearms
Post by: Meph on July 05, 2012, 09:42:46 pm
These reactions look familiar... ;)

I also discovered that bars of wood (yep) are listed under "Misc" same as the soap bars. So you could also use random plants and make bars from it, instead of soap. Have to test more, but maybe it will result in a nicer way to make it...
Title: Re: Black Powder Firearms
Post by: medikohl on July 06, 2012, 02:24:05 am
trade for a "flintlock wrapped in water-proof cloth" in which you unwrap it with a custom reaction.
"flintlock kit in oil cloth"
Title: Re: Black Powder Firearms
Post by: medikohl on July 06, 2012, 02:32:40 am
Pyrite enjoyed brief popularity in the 16th and 17th centuries as a source of ignition in early firearms, most notably the wheellock, where the cock held a lump of pyrite against a circular file to strike the sparks needed to fire the gun.
Title: Re: Black Powder Firearms
Post by: medikohl on July 06, 2012, 02:39:37 am
Sulfur may be found by itself and historically was usually obtained in this way, while pyrite has been a source of sulfur via sulfuric acid.[16] In volcanic regions in Sicily, in ancient times, it was found on the surface of the earth, and the "Sicilian process" was used: sulfur deposits were piled and stacked in brick kilns built on sloping hillsides, with airspaces between them. Then, some sulfur was pulverized, spread over the stacked ore and ignited, causing the free sulfur to melt down the hills. Eventually the surface-borne deposits played out, and miners excavated veins that ultimately dotted the Sicilian landscape with labyrinthine mines. Mining was unmechanized and labor-intensive, with pickmen freeing the ore from the rock, and mine-boys or carusi carrying baskets of ore to the surface, often through a mile or more of tunnels. Once the ore was at the surface, it was reduced and extracted in smelting ovens. The conditions in Sicilian sulfur mines were horrific, prompting Booker T. Washington to write "I am not prepared just now to say to what extent I believe in a physical hell in the next world, but a sulphur mine in Sicily is about the nearest thing to hell that I expect to see in this life."[17]
Title: Re: Black Powder Firearms
Post by: UristMcWanderer on July 06, 2012, 05:49:48 pm
I suggest that you change the "shotgun"'s name to "blunderbuss"... That's basically what a blunderbuss is, a muzzle-loaded shotgun with a flared muzzle (made it easier to load and made the shot spread, but also made it a hell of a lot louder).
Title: Re: Black Powder Firearms
Post by: Lord Inquisitor on July 06, 2012, 06:54:10 pm
being tring this with the download. However Dwarf Therapist quits on load. using Dwarf Therapist v0.6.12
Title: Re: Black Powder Firearms
Post by: Jake on July 06, 2012, 07:30:08 pm
I suggest that you change the "shotgun"'s name to "blunderbuss"... That's basically what a blunderbuss is, a muzzle-loaded shotgun with a flared muzzle (made it easier to load and made the shot spread, but also made it a hell of a lot louder).
"Blunderbuss" derives from a Dutch loan-word (http://en.wikipedia.org/wiki/Blunderbuss#Etymology), which goes against the established practice in vanilla of avoiding location-specific names for things. The word also conjures mental pictures of an absurd-looking weapon resembling nothing so much as a trumpet with a firing mechanism, the sort of thing wielded by overweight Germanic villains with enormous facial hair in Saturday morning cartoons and comic operas.

Neither can I use a direct English translation of the original donderbus, because I like to imagine DF dwarves as the sort of people who could come up with a name for a weapon that sounds considerably less dirty than "thunder-pipe".
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on July 06, 2012, 07:52:46 pm
being tring this with the download. However Dwarf Therapist quits on load. using Dwarf Therapist v0.6.12
Wrong thread

@medikohl
Pyrite is a type of gem in DF
Soo.. was this a type of crystalized sulfur?
Title: Re: Black Powder Firearms
Post by: Lord Inquisitor on July 06, 2012, 08:34:18 pm
being tring this with the download. However Dwarf Therapist quits on load. using Dwarf Therapist v0.6.12
Wrong thread

@medikohl
Pyrite is a type of gem in DF
Soo.. was this a type of crystalized sulfur?

nope , right thread, hoping someone would know or had similiar problems with 612 and this mod. I cloned my DF install, add the files and permissions to dwarfs but no good.
Anyideas? installing wrong the download bugged or out of date?
and when is next version of blackpowder guns out.
Title: Re: Black Powder Firearms
Post by: UristMcWanderer on July 06, 2012, 08:41:48 pm
overweight Germanic villains with enormous facial hair in Saturday morning cartoons and comic operas
Hey! I happen to be of German ancestry, and frankly find this slightly (albeit hilariously) offensive.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on July 06, 2012, 08:46:28 pm
overweight Germanic villains with enormous facial hair in Saturday morning cartoons and comic operas
Hey! I happen to be of German ancestry, and frankly find this slightly (albeit hilariously) offensive.
I also have some german blood, but i'm all for good laughs lol

@Lord Inquisitor
I was lead astray with the mention of DT. There shouldnt be any confict between a utility and raw changes :-/
are you sure it is just not DT having a fit?
Title: Re: Black Powder Firearms
Post by: Jake on July 07, 2012, 05:38:46 am
Hey! I happen to be of German ancestry, and frankly find this slightly (albeit hilariously) offensive.
Don't look at me, I didn't invent the trope.
Title: Re: Black Powder Firearms
Post by: medikohl on July 08, 2012, 03:11:59 pm
but you can make igneous extrusive clusters of sulfur for all your sulfur needs
Title: Re: Black Powder Firearms
Post by: medikohl on July 13, 2012, 08:39:34 pm
*checks for pulse*
Title: Re: Black Powder Firearms
Post by: Jake on July 14, 2012, 05:38:51 am
Sorry. Real life's been getting in the way.
Title: Re: Black Powder Firearms
Post by: UristMcWanderer on July 14, 2012, 09:09:51 am
Sorry. Real life's been getting in the way.
I can relate. I've been trying to work on two mods, and both summer school and family trips/vacations have been preventing me from working on them.
Title: Re: Black Powder Firearms
Post by: SandyCaesar on July 16, 2012, 06:09:18 pm
This project looks very interesting, and I'll be sure to keep an eye on it. I'm looking forward to plastering the next Uninvited Guest with a salvo of Congreves, hee hee.

A question for the future: is the propensity of booze to go kablooie hardcoded, or is explosiveness a series of tags? Minecart shotgunning behaviour plus actual explosive bags of blackpowder: the implications are making me drool. (Or, of course, just regular old bombs. Works too.)
Title: Re: Black Powder Firearms
Post by: Jake on July 16, 2012, 06:38:33 pm
Explosions don't currently do very much; a faceful of boiling-hot liquid exploding from a ruptured barrel should in theory cause burns, but I don't know if that works yet, and the game engine doesn't currently model blastwaves either.
Title: Re: Black Powder Firearms
Post by: killerx243 on July 29, 2012, 10:35:21 am
I suggest that you change the "shotgun"'s name to "blunderbuss"... That's basically what a blunderbuss is, a muzzle-loaded shotgun with a flared muzzle (made it easier to load and made the shot spread, but also made it a hell of a lot louder).
"Blunderbuss" derives from a Dutch loan-word (http://en.wikipedia.org/wiki/Blunderbuss#Etymology), which goes against the established practice in vanilla of avoiding location-specific names for things. The word also conjures mental pictures of an absurd-looking weapon resembling nothing so much as a trumpet with a firing mechanism, the sort of thing wielded by overweight Germanic villains with enormous facial hair in Saturday morning cartoons and comic operas.

Neither can I use a direct English translation of the original donderbus, because I like to imagine DF dwarves as the sort of people who could come up with a name for a weapon that sounds considerably less dirty than "thunder-pipe".

You're talking about the same dwarves that named themselves "The Fleshy Tower," and "Phallus Balls."

Now are these a candidate for artifacts? And will they show up in engravings and such? And will people have them in adventure mode (I did give them to the other races and added them as weapons they could use even including their ammo)

I have seen a goblin running about with a pistol and some silver bullets; so I sneaked over to him and cleaved his head from his shoulders. (looks like someone needed to worry less abot personal protection from werecreatures and more protection from me)
Title: Re: Black Powder Firearms
Post by: Jake on July 30, 2012, 03:02:36 am
Now are these a candidate for artifacts? And will they show up in engravings and such? And will people have them in adventure mode (I did give them to the other races and added them as weapons they could use even including their ammo)
I've had an artefact wooden spring-gun turn up before, so yes.
Title: Re: Black Powder Firearms
Post by: SandyCaesar on July 30, 2012, 05:00:57 pm
"Blunderbuss" isn't any more culture-specific than, say, "rifle" or "carbine" (both of which have French etymologies). For the next build, though, I'd like to request air rifles (http://en.wikipedia.org/wiki/Girandoni_Air_Rifle) perhaps replacing spring-guns or BB-guns; you'd need a leather bag as part of the construction process for the air container.

I've just installed the mod and am going to play a fortress with it; wish me luck. At last I'll get some utility out of the Potash Makers I keep getting in my migrant waves.

E: derp, me use forum markup good!
Title: Re: Black Powder Firearms
Post by: Jake on July 30, 2012, 06:43:28 pm
For the next build, though, I'd like to request air rifles (http://en.wikipedia.org/wiki/Girandoni_Air_Rifle) perhaps replacing spring-guns or BB-guns; you'd need a leather bag as part of the construction process for the air container.
Cool as they would undeniably be, it'd be nigh-impossible to replicate any of their drawbacks -small pressure tanks, susceptibility to damage- in-engine without extensive use and abuse of interactions, which wouldn't be much use in Fortress Mode.
Title: Re: Black Powder Firearms
Post by: SandyCaesar on July 31, 2012, 05:06:03 pm
Ah, that's fine. I've always been fascinated with the "road not taken" approach to historical techs.

Anyway, actually relevant question: since the bullets use the EDGE property, would this mean that materials that can hold an edge (bronze, iron, steel) are more effective than high-density materials (silver)?
Title: Re: Black Powder Firearms
Post by: UristMcWanderer on July 31, 2012, 06:28:22 pm
since the bullets use the EDGE property, would this mean that materials that can hold an edge (bronze, iron, steel) are more effective than high-density materials (silver)?
That can depend on how well-armored your attackers are. Bronze bullets vs leather armor is likely to cause considerable damage through the leather armor. Bronze bullets vs iron armor is going to bounce off most of the time and do little damage. Silver bullets vs iron armor might be able to cause some damage through the armor AFAIK.
Title: Re: Black Powder Firearms
Post by: Jake on July 31, 2012, 07:47:48 pm
Anyway, actually relevant question: since the bullets use the EDGE property, would this mean that materials that can hold an edge (bronze, iron, steel) are more effective than high-density materials (silver)?
Theoretically, yes, though I think high-density metals do better at inflicting blunt-force trauma if they fail to penetrate armour; there's a list of metals in order of combat effectiveness in some thread on !!SCIENCE!!, possibly on the wiki and even in someone's sig.
In practice it doesn't seem to matter that much versus humanoid opponents; even if the first centre-mass hit doesn't inflict a mortal wound, it'll still put its target out of the fight until someone else can administer the coup de gras.
Title: Re: Black Powder Firearms
Post by: SandyCaesar on July 31, 2012, 09:12:01 pm
More playing with the mode revealed two interesting things. The first is that, ordered to make gunstones out of any available metal, the dwarves made a stack of 60 large golden gunstones. They sold for 10800 for the stack. Holy precious ammunition, Urist, keep this up and we'll be buying the kingdom!

The second, more frustrating, is that I can't seem to get the dwarves to make cartridges. I've got large stocks of rope reed cloth, gunpowder (mostly in leather bags), large gunstones, and free cloth bags--yet the option remains red. Are there any tricks I'm missing?
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on July 31, 2012, 09:43:28 pm
More playing with the mode revealed two interesting things. The first is that, ordered to make gunstones out of any available metal, the dwarves made a stack of 60 large golden gunstones. They sold for 10800 for the stack. Holy precious ammunition, Urist, keep this up and we'll be buying the kingdom!

The second, more frustrating, is that I can't seem to get the dwarves to make cartridges. I've got large stocks of rope reed cloth, gunpowder (mostly in leather bags), large gunstones, and free cloth bags--yet the option remains red. Are there any tricks I'm missing?

Argh another reaction issue? I thought I had fixed all those?
Must have glazed over them... If Jake doesn't resolve this issue, I will try 2morrow. (As in my internet is on the friz making DL-ing anything impossibly slow)
Title: Re: Black Powder Firearms
Post by: killerx243 on July 31, 2012, 09:53:52 pm
So I screwed up when editing the raws, I didn't give humans musket ammo :P, if I change that will I need to regen the world or will they start carrying musket bullets from now on?
Title: Re: Black Powder Firearms
Post by: SandyCaesar on July 31, 2012, 10:15:02 pm
Well, it seems like a pretty crippling issue, so I suspect I'm the one who's hosed up somewhere, as otherwise it'd probably have been reported already. Still, as far as I can tell I have all the reagents, so, well, it is a mystery, I suppose.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on July 31, 2012, 10:16:57 pm
Would you be able to post the reactions here?
Title: Re: Black Powder Firearms
Post by: SandyCaesar on July 31, 2012, 10:45:48 pm
In-game it tells me that the reagents are "Large gunstone, Gunpowder, Bag, Plant Cloth", four items; it combines to make 60 large cartridges.

From the raws:
Code: [Select]
[REACTION:CARTRIDGES_L]
[NAME:prepare large cartridges]
[BUILDING:WORK_BENCH:NONE]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:60:AMMO:ITEM_AMMO_BULLET_L:NONE:NONE]
[REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
[REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:powder][PRESERVE_REAGENT]
[REAGENT:D:1000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]
[PRODUCT:100:60:AMMO:ITEM_AMMO_CARTRIDGE_L:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
[ADVENTURE_MODE_ENABLED]

EDIT: derp. I think I see the problem: I have only 80 units of gunpowder, and the reaction requires 150.
Title: Re: Black Powder Firearms
Post by: Jake on July 31, 2012, 11:17:09 pm
I think I see the problem: I have only 80 units of gunpowder, and the reaction requires 150.
Oh, thank Armok for that. I was starting to think we'd never see the end of that bug.

Anyway, I've finally got my gaming rig hooked up to the Internet, which should speed up the process of testing and bug-fixing. Unfortunately, I've also managed to mess up my laptop's hard drive, and the flash drive containing my backup copy has gone missing. I can recreate most of it easily enough and I'm sure the flash drive can't have gone far, but it's still extremely irritating.
Title: Re: Black Powder Firearms
Post by: SandyCaesar on July 31, 2012, 11:39:40 pm
Aww. Best of luck with that.

Still, though, I suggest posting quantities on the main page. 150 powder for 60 cartridges seems pretty exorbitant, so you may wish to warn players about that.

EDIT: wait, shit. I've got 150 powder, bullets out the wazoo, plant cloth, and bags free, and I still can't make cartridges.
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on August 01, 2012, 12:12:23 am
80 units? 150 units?
Erm
POWDER_MISC items are like BAR and LIQUID_MISC where they have dimensions of 150
150 is acually = to [1] stack/bar/item

Soooo.... How did you manage to make a stack of "80" POWDER_MISC gunpowder when the GP making reactions only produce "150" aka [1] stack of it in a bag?

The real issue is:

   [REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
   [REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:powder][PRESERVE_REAGENT]

The RED text shows the error
[CONTAINS:xxxx] looks for a REAGENT_ID

so really the container reagent should look like:
   [REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:B][PRESERVE_REAGENT]

Problem solved folks.
It takes 60 gunstones, [1] stack of bagged gunpowder, and 1/10th of a piece of cloth (which uses the whole cloth anyways)
To make 60 bullets (I hope, since quietust has informed me about how reactions do ratio things.)
Title: Re: Black Powder Firearms
Post by: SandyCaesar on August 01, 2012, 12:23:18 am
Sorry, I didn't mean a stack of 80 powder. I meant I had 80 units of gunpowder total; now I have a total of 150 bags of gunpowder. (Thank Armok explosions aren't modeled yet, the gunpowder stash is right next to the forges and the furnaces. If they caught a stray spark the results would be rather special.)

Anyway, I just made the edits on the raw files; the cartridge reactions now read:

Code: [Select]
[REACTION:CARTRIDGES_L]
[NAME:prepare large cartridges]
[BUILDING:WORK_BENCH:NONE]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:60:AMMO:ITEM_AMMO_BULLET_L:NONE:NONE]
[REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
[REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:B][PRESERVE_REAGENT]
[REAGENT:D:1000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]
[PRODUCT:100:60:AMMO:ITEM_AMMO_CARTRIDGE_L:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
[ADVENTURE_MODE_ENABLED]

[REACTION:CARTRIDGES_S]
[NAME:prepare small cartridges]
[BUILDING:WORK_BENCH:NONE]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:60:AMMO:ITEM_AMMO_BULLET_S:NONE:NONE]
[REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
[REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:B][PRESERVE_REAGENT]
[REAGENT:D:1000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]
[PRODUCT:100:60:AMMO:ITEM_AMMO_CARTRIDGE_S:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
[ADVENTURE_MODE_ENABLED]

[REACTION:CARTRIDGES_B]
[NAME:prepare buckshot cartridges]
[BUILDING:WORK_BENCH:NONE]
[ADVENTURE_MODE_ENABLED]
[REAGENT:A:180:AMMO:ITEM_AMMO_BULLET_S:NONE:NONE]
[REAGENT:B:150:POWDER_MISC:NONE:INORGANIC:GUNPOWDER]
[REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:B][PRESERVE_REAGENT]
[REAGENT:D:2000:CLOTH:NONE:NONE:NONE][ANY_PLANT_MATERIAL]
[PRODUCT:100:30:AMMO:ITEM_AMMO_BUCKSHOT:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
[ADVENTURE_MODE_ENABLED]

It still isn't letting me make any of the cartridges. Any help?
Title: Re: Black Powder Firearms
Post by: Hugo_The_Dwarf on August 01, 2012, 01:50:53 am
remove [ANY_PLANT_MATERIAL] from the CLOTH reagent and give it a go
Title: Re: Black Powder Firearms
Post by: SandyCaesar on August 01, 2012, 02:18:17 am
Still nope. Strangely, the workbench still asks for plant cloth. Changes to the raws should be reflected in-game immediately, right?

Completely unrelated, has anyone successfully gotten dwarves to practice their marksmanship with spring guns? I just want to know if it's possible at the moment; my spring gun-equipped marksmen are lounging around, and an attempt to get them to kill a goblin thief resulted in a broken arm for one of them when they decided to charge in with bayonets (instead of shooting him). I suspect this is more my problem in configuring them.
Title: Re: Black Powder Firearms
Post by: SandyCaesar on August 03, 2012, 06:49:24 pm
So, er, I hate to be a bother, but it seems that in addition to my cartridge woes, I can't get spring guns to work. From what I understand, they're supposed to be loaded with gunstones (like BBs) and fired. It seems that Arena mode respects that, but I can't get my dwarves in Fortress Mode to understand.

Perhaps it's because they only know how to use quivers and crossbows...?
Title: Re: Black Powder Firearms
Post by: meeneque on September 07, 2012, 06:19:05 am

so really the container reagent should look like:
   [REAGENT:C:1:BOX:NONE:NONE:NONE][BAG][CONTAINS:B][PRESERVE_REAGENT]

Problem solved folks.

Sorry but it is not true. When you change reaction like that, you have B-containing bag in ingredients listed in the workshop.

 The only error I found is in:
[PRODUCT_TO_CONTAINER:bag] which in this case should be (?) used with reagrent ID. ie
[PRODUCT_TO_CONTAINER:C]
otherwise I'm getting gunpowder out of the bag, lying in the workshop.
On the other end I've been playing with this mod for two weeks and have yet to make one cartridge. So I'll probably give it up, cause I'm no reaction master and obviously something is not right. I Have a lot of gunstones, cloth and gunpowder and still get:
Urist McUrist cancels prepare small cartridges: Needs 1 gunpowder
Title: Re: Black Powder Firearms
Post by: smakemupagus on September 07, 2012, 11:11:49 am
Well, Hugo was right, that the [CONTAINS:xxxx] token has to match a valid reagent ID.  And the ID "powder" wasn't defined as the name of any of the reagents in the first reaction you posted. 

But I don't see anything obviously wrong with the one that you SandyCaesar edited.  I wonder if you're now running into the "bag in barrel" issue, where reagents are hidden from custom reactions if they're nested too deep in a stack of containers.

Title: Re: Black Powder Firearms
Post by: Jake on September 16, 2012, 05:15:19 am
Sorry it's been a while, folks. Not only did it take me ages to find the Flash drive holding the backup copy of BPFA, real-life personal issues ambushed me for a while. I won't go into detail here, but while they're a long way from being fixed and probably won't ever be entirely, they're currently under control.

Anyway, the new gun components are complete:
Quote from: item_tool_guns.txt
[ITEM_TOOL:ITEM_TOOL_FIRELOCK_L]
[NAME:large firelock:large firelocks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_FIRELOCK_S]
[NAME:small firelock:small firelocks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_SPRINGLOCK_L]
[NAME:large spring-lock:large spring-locks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_SPRINGLOCK_S]
[NAME:small spring-lock:small spring-locks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_FLINT]
[NAME:striker:strikers]
[VALUE:1]
[TILE:.]
[SIZE:1]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_BOX_FL_L]
[NAME: box of large firelocks:boxes of large firelocks]
[VALUE:1500]
[WOOD_MAT]
[TILE:\]
[SIZE:750]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_BOX_FL_S]
[NAME: box of small firelocks:boxes of small firelocks]
[VALUE:1500]
[WOOD_MAT]
[TILE:\]
[SIZE:750]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_BOX_SL_L]
[NAME: box of large spring-locks:boxes of large spring-locks]
[VALUE:1500]
[WOOD_MAT]
[TILE:\]
[SIZE:750]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_BOX_SL_S]
[NAME: box of small spring-locks:boxes of small spring-locks]
[VALUE:1500]
[WOOD_MAT]
[TILE:\]
[SIZE:750]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]
My next job is going to be to create reactions for making them. Large firelocks or spring-locks will each take half a bar of steel to make, small ones a third of one. Boxes of firelocks will take ten of each kind plus a wooden chest; straw will be added if and when it's introduced into vanilla DF. Strikers are still up in the air somewhat, but I intend for one boulder of flint -and possibly other materials- to make several hundred of them by way of compensating for it being relatively rare.
Title: Re: Black Powder Firearms
Post by: bennerman on September 25, 2012, 04:41:41 pm
Ok, how, exactly, do I get this to work in adventure mode? sorry  ???
Title: Re: Black Powder Firearms
Post by: Droid15243Z on October 05, 2012, 12:30:12 am
Can I add this to a mod I'm making? I'll give you credit and make a link to this page. :)
Title: Re: Black Powder Firearms
Post by: Jake on October 05, 2012, 01:20:45 am
Can I add this to a mod I'm making? I'll give you credit and make a link to this page. :)
Be my guest.
Title: Re: Black Powder Firearms
Post by: Droid15243Z on October 05, 2012, 02:36:25 am
Can I add this to a mod I'm making? I'll give you credit and make a link to this page. :)
Be my guest.
[/quote]
Thankyou!
Title: Re: Black Powder Firearms
Post by: LordBaal on November 28, 2012, 12:41:42 pm
Is this mod working with the latest version of the game?
Title: Re: Black Powder Firearms
Post by: Triskelli on November 28, 2012, 01:45:28 pm
I know this may be outside the scope of this mod, but has anyone tried adding a "cannon" creature to this mod, much the same as wagons in the vanilla game?  It'd be gamey as all hell, yes, but it *could* work.  I might even take a stab at it after finals.  But as for how it would work on an in-game level...

Well, there are one of two possibilities:  One is using an interaction to throw cannonballs, but the downside is how erractic and how quickly these things are thrown when uncontrolled.

A different, rather ingenious method would be giving cannons the ability to "throw" cannonballs as a resource, but I'm still puzzling out how that might work.  Any ideas?
Title: Re: Black Powder Firearms
Post by: Jake on January 06, 2014, 06:10:48 am
Bloody hell, it's been a while.

Sorry for the long absence, everyone. My life kind of self-destructed and it took me a long time to put it all back together. I'm getting there now, though, and now I'm back into DF -with a shiny new gaming PC into the bargain!- development work will be resuming just as soon as I finish going over my notes.

In fact, here's a Dropbox link to the in-progress version. (https://www.dropbox.com/sh/i46ob8nnvb1dhgq/spD2zKyIDW) I got as far as creating individual "firelock" items as well as "crate of firelocks" items for import from the caravans, I just stalled on the reactions to go from one to the other.
Title: Re: Black Powder Firearms
Post by: Urist McEngraver on January 06, 2014, 09:44:26 pm
I tested this a little when it first came out several years ago, so colour me re-interested! Welcome back.
Title: Re: Black Powder Firearms
Post by: Jake on January 10, 2014, 04:28:58 am
Progress:

Quote from: New Tools
[ITEM_TOOL:ITEM_TOOL_FIRELOCK_L]
[NAME:large firelock:large firelocks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_FIRELOCK_S]
[NAME:small firelock:small firelocks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_SPRINGLOCK_L]
[NAME:large spring-lock:large spring-locks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_SPRINGLOCK_S]
[NAME:small spring-lock:small spring-locks]
[VALUE:150]
[METAL_MAT]
[TILE:¬]
[SIZE:10]
[MATERIAL_SIZE:2]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_FLINT]
[NAME:striker:strikers]
[VALUE:1]
[TILE:.]
[SIZE:1]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_BOX_FL_L]
[NAME: box of large firelocks:boxes of large firelocks]
[VALUE:1500]
[WOOD_MAT]
[TILE:\]
[SIZE:750]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_BOX_FL_S]
[NAME: box of small firelocks:boxes of small firelocks]
[VALUE:1500]
[WOOD_MAT]
[TILE:\]
[SIZE:750]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_BOX_SL_L]
[NAME: box of large spring-locks:boxes of large spring-locks]
[VALUE:1500]
[WOOD_MAT]
[TILE:\]
[SIZE:750]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

[ITEM_TOOL:ITEM_TOOL_BOX_SL_S]
[NAME: box of small spring-locks:boxes of small spring-locks]
[VALUE:1500]
[WOOD_MAT]
[TILE:\]
[SIZE:750]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]

Quote from: New Reactions
[REACTION:UNBOX1]
   [NAME:unbox large firelocks]
   [BUILDING:WORK_BENCH:NONE]
   [REAGENT:A:1:TOOL:ITEM_TOOL_BOX_FL_L:ORGANIC:WOOD:NONE]
   [PRODUCT:100:6:TOOL:ITEM_TOOL_FIRELOCK_L:METAL:STEEL]
   [PRODUCT:95:1:BOX:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE] Small chance that the box will get broken in the process.
   [SKILL:GRASP_STRIKE] There isn't really an appropriate skill for this, so just pretend the lid's nailed down really tight.
   
[REACTION:UNBOX2]
   [NAME:unbox small firelocks]
   [BUILDING:WORK_BENCH:NONE]
   [REAGENT:A:1:TOOL:ITEM_TOOL_BOX_FL_S:ORGANIC:WOOD:NONE]
   [PRODUCT:100:10:TOOL:ITEM_TOOL_FIRELOCK_S:METAL:STEEL]
   [PRODUCT:95:1:BOX:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
   [SKILL:GRASP_STRIKE]
   
[REACTION:UNBOX3]
   [NAME:unbox large spring-locks]
   [BUILDING:WORK_BENCH:NONE]
   [REAGENT:A:1:TOOL:ITEM_TOOL_BOX_SL_L:ORGANIC:WOOD:NONE]
   [PRODUCT:100:6:TOOL:ITEM_TOOL_SPRINGLOCK_L:METAL:STEEL]
   [PRODUCT:95:1:BOX:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
   [SKILL:GRASP_STRIKE]
   
   [REACTION:UNBOX4]
   [NAME:unbox small spring-locks]
   [BUILDING:WORK_BENCH:NONE]
   [REAGENT:A:1:TOOL:ITEM_TOOL_BOX_SL_S:ORGANIC:WOOD:NONE]
   [PRODUCT:100:10:TOOL:ITEM_TOOL_SPRINGLOCK_S:METAL:STEEL]
   [PRODUCT:95:1:BOX:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
   [SKILL:GRASP_STRIKE]

Flint strikers don't do anything yet, that's the next job after I test this little lot. Thanks to Meph for helping me out with the un-boxing reactions.
Title: Re: Black Powder Firearms
Post by: Meph on January 10, 2014, 04:30:55 am
I did?

 [REAGENT:A:1:TOOL:ITEM_TOOL_BOX_SL_S:ORGANIC:WOOD:NONE] => I have never seen the ORGANIC token. Is it an alternative for PLANT_MAT ? This just looks so odd. TOOL:ITEM_TOOL_SL_S:NONE:NONE should be fine.
Title: Re: Black Powder Firearms
Post by: Jake on January 10, 2014, 04:51:24 am
Yes, you did; I was tearing my hair out trying to figure out the item token for a wooden chest before I got sidetracked by financial strife, mental illness and other general unpleasantness upon which I shall not enlarge here.

And you could well be right. I'll do a test worldgen after I give my desktop's fans a thorough cleaning; the CPU temperature hit 82C0 earlier.
Title: Re: Black Powder Firearms
Post by: Jake on January 23, 2014, 07:41:22 am
*sigh* I've tried three worldgens and I still can't get it to show up for5 my dorfs. Maybe you'll have more luck.

Dropbox link (https://www.dropbox.com/s/6i4eyhty132px1z/BPFA%200.9%20RC1.zip).
Title: Re: Black Powder Firearms
Post by: LordBaal on January 23, 2014, 08:03:41 am
*sigh* I've tried three worldgens and I still can't get it to show up for5 my dorfs. Maybe you'll have more luck.

Dropbox link (https://www.dropbox.com/s/6i4eyhty132px1z/BPFA%200.9%20RC1.zip).
Dude, I'm guessing you are going to update it to the next release also?
Title: Re: Black Powder Firearms
Post by: Meph on January 23, 2014, 08:21:03 am
Your BULLET_MAGMA and GUN_MAGMA is not enabled in the entity file.

I would add a :FORCED to the lines in " Add some combination of the following to any other civs you want to be armed with guns, and/or buy components from.". This makes sure that the enemy civ has access to them. [ITEM_WEAPON:WEAPON_ID:FORCED]

Quote
:CUSTOM_f
That doesnt work. CUSTOM_f doesnt exist. For 'f' you need CUSTOM_F, and for 'F' you need CUSTOM_SHIFT_F. (you can also use CUSTOM_ALT_F for alt+f)

All these are wrong: [TILE:.] Everything that is not a number in that field must be 'symbol'. So '.' or '+' or '*'. Only if you use TILE:144 or TILE:244 you dont need the ''. Thats in all your tools. (in your inorganic you did it right: [TILE:'~'])

Your magma buildings probably should use [MAGMA_BUILD_SAFE] instead of [FIRE_BUILD_SAFE].

Title: Re: Black Powder Firearms
Post by: Drug_unit on February 21, 2014, 08:54:48 am
I don't suppose the mod in the OP itself is still usable in current DF?
Title: Re: Black Powder Firearms
Post by: Jake on February 21, 2014, 10:39:33 am
I don't suppose the mod in the OP itself is still usable in current DF?
So far as I'm aware it should work fine; 0.34 didn't change anything about reactions.
Title: Re: Black Powder Firearms
Post by: Drug_unit on February 21, 2014, 12:19:48 pm
Good to know i want a simple but effective mod to arm my dorfs whit firepower. Thanks for making this.
Title: Re: Black Powder Firearms
Post by: Drug_unit on February 22, 2014, 06:15:37 am
Also sorry to double post but if i removed    [REAGENT:C:1:BOULDER:NO_SUBTYPE:INORGANIC:BRIMSTONE] from the reaction raw that would mean i would not  need brimstone to make powder right?
Title: Re: Black Powder Firearms
Post by: Jake on February 22, 2014, 08:27:08 am
Yes. Though you can always buy gunpowder from the caravans if it's too much of a pain to make.
Title: Re: Black Powder Firearms
Post by: Drug_unit on February 24, 2014, 06:26:40 pm
So i have all the required components but its not letting me make cartridges the requierments say it needs a workbench even though i already made one.
Also do muskets use cartridges or just normal bullets?
Title: Re: Black Powder Firearms
Post by: Jake on February 24, 2014, 06:52:07 pm
Muskets use cartridges. And try going to the workbench direct and putting "make cartridges" on repeat.
Title: Re: Black Powder Firearms
Post by: Drug_unit on February 24, 2014, 07:07:05 pm
Even the workbench itself the option to make the ammo out of anything is just red and it says it needs a workbench to be made.
I THINK the problem is that gunpowder does not go to any storage plot so the dwarves don't register it as existing in the fort so to say.
Same goes for the bullets themselves.
Title: Re: Black Powder Firearms
Post by: Jake on February 24, 2014, 07:19:08 pm
The hell...? Can you provide a screenshot and the error logs?
Title: Re: Black Powder Firearms
Post by: Drug_unit on February 25, 2014, 07:46:03 am
There is no error log even i think its maybe me messing something up after i modified the raw's little i have to check.
Simply put i honestly know know whats wrong. Maybe i don't have a stockpile that stocks gunpowder,bullets yet.
EDIT: I have everything i need in stock its just when i go to the workbench the option to make large cartriges is red.
Final edit: It seems using the manager they are making cartriges but i ran out of gunpowder.
It seems the guy cant find gunpowder even though i should have loads in stock. Could the fact that i modified the reaction to make gunpowder affect it?
Title: Re: Black Powder Firearms
Post by: Jake on February 25, 2014, 12:58:45 pm
It shouldn't have, or at least not as long as the product of the reaction was still gunpowder.

I'm going to try and reproduce the bug myself as soon as I figure out why my gaming rig's screen is giving me such horrible eyestrain.
Title: Re: Black Powder Firearms
Post by: Drug_unit on February 25, 2014, 02:31:03 pm
Well removing the black powder itself from the reaction seemed to work. Still have not tested if the guns fire though.
Title: Re: Black Powder Firearms
Post by: Agent_Irons on June 28, 2014, 10:47:12 am
NB: There's a typo in the armed_blag reaction. Item_weapon:shotgun and item_weapon:shotgun_sawn_off should be item_weapon_shotgun and item_weapon_shotgun_sawn_off
Title: Re: Black Powder Firearms
Post by: LordBaal on July 11, 2014, 10:43:08 am
I demand an update, NOW!

;)
Hehehehe

But seriously, you plan to have this updated to the new version?
Title: Re: Black Powder Firearms
Post by: Jake on July 11, 2014, 12:08:34 pm
I've not yet had a chance to delve into the raws of the new version, and in any case I'm somewhat crippled by not having proper PC to develop on at the moment, but yes.
Title: Re: Black Powder Firearms
Post by: Teneb on July 11, 2014, 12:18:29 pm
I've not yet had a chance to delve into the raws of the new version, and in any case I'm somewhat crippled by not having proper PC to develop on at the moment, but yes.
From looking at the raws, the changes should be minor. Probably just adding [ATTACK_PREPARE_AND_RECOVER:X:Y] to each weapon and projectile.
Title: Re: Black Powder Firearms
Post by: Sergarr on July 11, 2014, 02:56:06 pm
You can also now make balanced uber-attacks for various weapons. Just make them take much more time.
Title: Re: Black Powder Firearms
Post by: Agent_Irons on August 17, 2014, 12:46:10 am
I've not yet had a chance to delve into the raws of the new version, and in any case I'm somewhat crippled by not having proper PC to develop on at the moment, but yes.
Wotcher: since .40.05 SHOOT_FORCE is worth ~5% of what it was before, and projectiles under one kilogram are no longer fired as though they had zero mass.

Side effect: black powder weapons are now much more useful, as an expensive-to-fire but reliably armor-penetrating weapon is now a thing that might be good to have. Spring guns can be given longer reload times without affecting anything else. In general actually shooting can be made quick but reload be made slow (attack_prepare_and_recover:1:20, for instance. Or the reverse to model loading then firing, also allowing firing then stabbing naturally. Depends whether you assume the weapon is always loaded or is kept unloaded).
Title: Re: Black Powder Firearms
Post by: LordBaal on August 17, 2014, 06:22:26 am
In DF universe I would always have as many weapons loaded as I dwarfmanly can.
Title: Re: Black Powder Firearms
Post by: Jake on August 17, 2014, 07:25:03 am
I'll have to give that some thought. Thanks for the input, and expect further developments once I have a DF-worthy PC again.
Title: Re: Black Powder Firearms
Post by: Jake on August 30, 2014, 06:34:20 am
Well, I now have a DF-capable PC again. It doesn't have an Internet connection or a proper plaintext editor yet and it's running Windows Vista, but it'll do. Time to get back on track!

I think I'm going to have to drop backwards compatibility for 0.34 simply because the new ATTACK_PREP_AND_RECOVER mechanic is... Well, basically it's going to make reload times work properly, something I've been trying and failing to get to work since Day 1. Exact numbers are TBC but there's going to be a broad inverse ratio between stopping power and rate of fire.
Title: Re: Black Powder Firearms
Post by: Agent_Irons on August 30, 2014, 07:15:28 pm
Hooray!
Title: Re: Black Powder Firearms
Post by: Jake on August 31, 2014, 01:44:16 pm
Well, I did a quick-and-dirty conversion to .40.10 and ran some arena tests. Preliminary conclusions:

1. We're back to 40d rates of fire even with ATTACK_PREP_AND_RECOVER set to 20:2. Further !!SCIENCE!! is badly needed on exactly what that new stat actually does because there's nothing on the wiki.

2. SHOOT_FORCE is going to need a huge boost, because lead bullets are basically paintballs; a dwarf got hit in the face with a rifle shot and suffered a bruised eyelid.
Title: Re: Black Powder Firearms
Post by: scamtank on August 31, 2014, 03:19:25 pm
Yeah, the recovery time stats only affect melee attacks. If there's a way to adjust ranged weapon reload times, I haven't heard of one yet.
Title: Re: Black Powder Firearms
Post by: Agent_Irons on August 31, 2014, 03:24:21 pm
Well, I did a quick-and-dirty conversion to .40.10 and ran some arena tests. Preliminary conclusions:

1. We're back to 40d rates of fire even with ATTACK_PREP_AND_RECOVER set to 20:2. Further !!SCIENCE!! is badly needed on exactly what that new stat actually does because there's nothing on the wiki.

2. SHOOT_FORCE is going to need a huge boost, because lead bullets are basically paintballs; a dwarf got hit in the face with a rifle shot and suffered a bruised eyelid.
SHOOT_FORCE is basically 1/20th of what it was, if that helps you ballpark things.

And watch out about drawing conclusions based on eyelids, the old .34 bolt science thread recorded only three deflections all of which were off eyeballs. Facial features are a little strange.
Title: Re: Black Powder Firearms
Post by: Jake on August 31, 2014, 03:51:44 pm
Yeah, the recovery time stats only affect melee attacks. If there's a way to adjust ranged weapon reload times, I haven't heard of one yet.
It must do something, though, because why else would ammunition have its own [ATTACK_PREP_AND_RECOVER] stat? (Which is a less than ideal way of doing it from my perspective, I might add, because it means separating rifle and musket ammunition.)

SHOOT_FORCE is basically 1/20th of what it was, if that helps you ballpark things.

And watch out about drawing conclusions based on eyelids, the old .34 bolt science thread recorded only three deflections all of which were off eyeballs. Facial features are a little strange.
I'll add an extra zero to it for the next round of tests and see if that helps. I'm running nearly all my tests with lead ammunition at the minute, and the results have not been encouraging...

Although it does look quite badass when a dwarf just stands there with bullets bouncing off their armour. I'll try and upload some footage to DFMA at some point.
Title: Re: Black Powder Firearms
Post by: scamtank on August 31, 2014, 04:07:26 pm
It must do something, though, because why else would ammunition have its own [ATTACK_PREP_AND_RECOVER] stat?

It's for when you just grab an arrow and start stabbing fools. That attack needs stats too.
Title: Re: Black Powder Firearms
Post by: Jake on September 01, 2014, 03:46:50 pm
Well, messing around with SHOOT_MAXVEL and SHOOT_FORCE had no discernable effect at all, although I haven't done a proper side-by-side test against crossbows yet; I'm not sure I want to know, either. And I haven't even got around to testing the new reactions yet, but they're probably going to be hilariously broken because reactions in general make my head hurt.

Can you tell I'm getting a little despondent here?
Title: Re: Black Powder Firearms
Post by: Agent_Irons on September 02, 2014, 08:41:02 am
Well, messing around with SHOOT_MAXVEL and SHOOT_FORCE had no discernable effect at all, although I haven't done a proper side-by-side test against crossbows yet; I'm not sure I want to know, either. And I haven't even got around to testing the new reactions yet, but they're probably going to be hilariously broken because reactions in general make my head hurt.

Can you tell I'm getting a little despondent here?
Reactions haven't actually changed very much. Brewables are now a reaction class because of the new plants, but that's it, I think. Also globs have a size now? I think? Idk, reactions are black magic. I was fooling around with wizard tower and made ten thousand slings the other day. (that is too many slings for dwarf fortress to handle, as it turns out.)
Title: Re: Black Powder Firearms
Post by: Jake on September 03, 2014, 12:21:47 pm
Well, we have some progress: I think I finally nailed the reaction bugs Drug_unit reported, and I've tweaked the weapon and ammo raw entries a bit so that lead bullets aren't completely worthless. (They still plink off armour like Nerf darts but break bones on impact with bare flesh, so one lucky hit will kill or disable.)

The bad news is that I have no solution for the rate of fire issue; ATTACK_PREP_AND_RECOVER doesn't affect it at all so far as I can tell.
Title: Re: Black Powder Firearms
Post by: smakemupagus on September 04, 2014, 12:43:41 am
The bad news is that I have no solution for the rate of fire issue; ATTACK_PREP_AND_RECOVER doesn't affect it at all so far as I can tell.

Oh, that is too bad!!
Title: Re: Black Powder Firearms
Post by: LordBaal on September 04, 2014, 07:08:27 am
ATTACK_PREP_AND_RECOVER apparently doesn't affect ranged weapons either (regular and cross bows, blowguns)? Can anyone confirm that?
Title: Re: Black Powder Firearms
Post by: Jake on September 04, 2014, 07:22:07 am
ATTACK_PREP_AND_RECOVER apparently doesn't affect ranged weapons either (regular and cross bows, blowguns)? Can anyone confirm that?
I've carried out side-by-side tests with rifles and crossbows and their rate of fire is perfectly identical, so yes. It looks like ranged weapon rates of fire are hardcoded somewhere.
Title: Re: Black Powder Firearms
Post by: LordBaal on September 04, 2014, 09:37:37 am
Drats! The ball is now on Toady's side.
Title: Re: Black Powder Firearms
Post by: Jake on September 04, 2014, 10:31:59 am
Eh, it doesn't much matter. I'm actually somewhat glad the ATTACK_PREP_ETC stat in item_ammo doesn't affect rate of fire, because then I'd have to have a separate type of ammunition for each firearm.
Title: Re: Black Powder Firearms
Post by: Jake on September 19, 2014, 05:37:29 am
Okay, quick status update everyone. The bad news is that development and testing have been heavily delayed due to technical problems:

The good news is, I'm pretty sure cartridge production works now. I've also tinkered with the weapon and ammunition numbers so that lethality should be historically accurate to the late Renaissance or Early Modern period; guns are highly effective, but not to the point where they've displaced crossbows or armour entirely. Lastly, the readme file is now much more comprehensive and contains detailed instructions, something that's been lacking for a while.

To that end, here's the barely-tested but hopefully working V0.9 RC2 (https://www.dropbox.com/s/xlgwky5e08v4vur/BPFA%200.9%20RC2.zip?dl=0).
Title: Re: Black Powder Firearms
Post by: LordBaal on September 19, 2014, 07:08:29 am
Excelent!!!
Title: Re: Black Powder Firearms
Post by: Rammok on September 19, 2014, 02:49:29 pm
Does anyone know how muskets compare with crossbows power wise?

 ::)
If Lucelle's using the raws from the last release of BPFA without any modifications, they might actually be considerably inferior. The update for 0.40 is still in testing and hasn't been uploaded to DFFD yet, but there's a link to a release candidate version at the end of the thread.

Cool I just downloaded it. I think I'll just drop BPFA 0.9 RC2 into Dark Ages tonight and hope for the best.
Title: Re: Black Powder Firearms
Post by: Featheredragon on September 19, 2014, 04:22:03 pm
Just going to leave this here. Tell me if any thing seems off; compiled this from memory at home when bored. (no internet.)

Code: [Select]
item_weapon_firearms_TEST

[OBJECT:ITEM]

-Basic Firearms---------------------------------------------------------------------------------

-First hand held firearm-

[WEAPON:ITEM_WEAPON_ARQUEBUS]
[NAME:arquebus:arquebuses]

-Basic smoothbore firearm. Comes in matchlock, wheelock, flintlock, and percussion. Some experimential actions also-

[WEAPON:ITEM_WEAPON_MUSKET]
[NAME:musket:muskets]

-Musket with an intergrated or removable spike, blade or knife.-

[WEAPON:ITEM_WEAPON_MUSKET_BAY]
[NAME:musket:muskets][ADJECTIVE:bayonetted]

-Smooth bore musket of a very high calibre, meant to spread a larg amount of projectiles over a wide area. Muzzle is       usally flared for easy loading.-

[WEAPON:ITEM_WEAPON_BLUNDERBUSS]
[NAME:blunderbuss:blunderbusses]

-Blunderbuss with an intergrated or removable spike, blade or knife; often springloaded.-

[WEAPON:ITEM_WEAPON_BLUNDERBUSS_BAY]
[NAME:blunderbuss:blunderbusses][ADJECTIVE:bayonetted]

-Basic short smoothbore firearm. Comes in matchlock, wheelock, flintlock, and percussion. Some experimential actions      also. Meant to be used in one hand.-

[WEAPON:ITEM_WEAPON_PISTOL]
[NAME:pistol:pistols]

-Pistol with an intergrated or removable spike, blade or knife; often springloaded-

[WEAPON:ITEM_WEAPON_PISTOL_BAY]
[NAME:pistol:pistols][ADJECTIVE:bayonetted]

-Complex/Reapeating Firearms---------------------------------------------------------------------

-A firearm with twin barrels usually one over the other. A switch on the side allows the second barrel to be fired.-

[WEAPON:ITEM_WEAPON_TAP_ACTION]
[NAME:tap action pistol:tap action pistols]
[NAME:tap action musket:tap action muskets]
[NAME:tap action carbine:tap action carbines]

-A musket with many barrels (up to 9) gouped together. All barrels are fired at once.-

[WEAPON:ITEM_WEAPON_VOLLEY_GUN]
[NAME:volley gun: volley guns]

-A pistol with 4-5 splayed barrels (Like a ducks foot). all fire a once.-

[WEAPON:ITEM_WEAPON_DUCKS_FOOT]
[NAME:ducksfoot pistol:ducksfoot pistols]

-A musket with a revolving chamber allowing for multiple shots. All accept percussion are prone to chain fireing and     debilitating malfuctions.-

[WEAPON:ITEM_WEAPON_REV_LONG]
[NAME:revolving musket:revolving muskets]

-A carbine with chambers lined up in a bar, allowing for muliple shots. Prone to the slide not aligning right and causing  a KB.-

[WEAPON:ITEM_WEAPON_HARMONICA_C]
[NAME:harmonica carbine:harmonica carbines]

-A pistol with chambers lined up in a bar, allowing for muliple shots. Prone to the slide not aligning right and causing   a KB.-

[WEAPON:ITEM_WEAPON_HARMONICA_P]
[NAME:harmonica pistol:harmonica pistols]

-A musket with chambers linked together in a looped chain allowing for multiple shots. Prone to malfunctions and the     chambers not aligning right and causing a KB. Also prone to chain firing.-

[WEAPON:ITEM_WEAPON_CHAIN_M]
[NAME:chain-fed musket:chain-fed muskets]

-A pistol with chambers linked together in a looped chain allowing for multiple shots. Prone to malfunctions and the     chambers not aligning right and causing a KB. Also prone to chain firing.-

[WEAPON:ITEM_WEAPON_CHAIN_P]
[NAME:chain-fed pistol:chain-fed pistols]

-A pistol with many barrels grouped together allowing for multiple shots. The barrels had to be turned by hand, and      because of excessive weight never got larger than a carbine and was soon replaced by the revolver.-

[ITEM_WEAPON:ITEM_WEAPON_PEPPER]
[NAME:pepperbox revolver:pepperbox revolver]

-A revolver halfway between a percussion revolver and a pepperbox. As good revolvers had already been invented this was a  cheap and poor quality defence weapon.-

[WEAPON:ITEM_WEAPON_TRANSITION]
[NAME:transitional revolver:transitional revolvers]

-A muzzle loading revolver fired with a percussion cap from the rear.-

[ITEM_WEAPON:ITEM_WEAPON_REVOLVER_BP]
[NAME:percussion revolver:percussion revolvers]

-A percussion revolver with a 9 shot cylinder revolving around a shotgun barrel. The shotgun barrel could be fired by      ajusting the firing pin on the hammer-

[WEAPON:ITEM_WEAPON_LE_MATT]
[NAME:LeMatt revolver:LeMatt revolvers]

-A carbine or musket with a cup on the front for lobbing cast-iron or bronze grenades. Could be dangerous and       unpridictible is handled by amatures.-

[WEAPON:ITEM_WEAPON_LOBBER]
[NAME:grenade lobber:grenade lobbers]

-A advanced carbine or rifle loaded from the rear with paper or cloth cartridges. Closing the action caused a blade to     open the cartridge. Fired with percussion caps that could be linked together in a specialized dispenser. Renown for is    accuraccy.-

[ITEM_WEAPON:ITEM_WEAPON_SHARPS]
[NAME:sharps carbine:sharps carbines]
[NAME:sharps rifle:sharps rifles]   

-Sharps Carbine/Rifle with an removable bayonet.-

[ITEM_WEAPON:ITEM_WEAPON_SHARPS_BAY]
[NAME:sharps carbine:sharps carbines][ADJECTIVE:bayonetted]
[NAME:sharps rifle:sharps rifles][ADJECTIVE:bayonetted]

-A musket/rifle/shotgun with two barrels fired with seprate actions. Could be flintlock or percussion. A few    experimential actions are known-

[ITEM_WEAPON:ITEM_WEAPON_DOUBLE]
[NAME:double barreled shotgun:double barreled shotguns]
[NAME:double barreled rifle:double barreled rifles]
[NAME:double barreled pistol:double barreled pistols]
[NAME:double barreled musket:double barreled muskets]

-Actions--------------------------------------------------------------------------------------------               

-The powder is ignited by a match/red hot iron held seperatly in the hand; which is then inserted into a hole in the     barrel for firing-

[ADJECTIVE:No action]

-A slow smoldering match attached to a firing mechanisim. First Mechinized action.-

[ADJECTIVE:Matchlock]

-A flint or iron pyrite hits a spinning, springloaded wheel. Complicated and expensive. Wheel has to be re-wound after     every shot.-

[ADJECTIVE:Wheellock]

-A flint hits a textured metal bar creating sparks which hits the priming powder. The frizzed also acts as the pan cover.  Cheap and reliable.-

[ADJECTIVE:Flintlock]

-Predissesor to flintlock. The pan is opened by a seperate mechanisim. Slightly more complex than flintlock-

[ADJECTIVE:Snaphazuen]

-A flinlock action situated in the center of the firearm. Used on pocket pistols for less places to snag.-

[ADJECTIVE:Boxlock]

-The hammer hits an small copper cup which is filled with an impact sensitive explosive. Super reliable and weather       proof.

[ADJECTIVE:Percussion]

-A percussion firearm with the action situated on the bottom. Used for a cleaner sight line.-

[ADJECTIVE:Underhammer]

-Simular to percussion. The impact expolsive is formed into a small rod which is then inserted into the action.

[ADJECTIVE:Tubelock]

-Descriptors---------------------------------------------------------------------------------------

-Shows weapon is neglected.-

[ADJECTIVE:Dirty]
[ADJECTIVE:Rusty]
[ADJECTIVE:Battered]
[ADJECTIVE:Stained]

-Shows weapon is damaged and dangerous to use-

[ADJECTIVE:Corroded]
[ADJECTIVE:Damaged]
[ADJECTIVE:Flawed]

-Shows Wepon is unreliable-

[ADJECTIVE:Jammed]
[ADJECTIVE:Shoddy]
[ADJECTIVE:Experimental]
[ADJECTIVE:Sticky/Slow Mechanisim]
[ADJECTIVE:Improvised]

-Shows weapon is loved-

[ADJECTIVE:Maintained]
[ADJECTIVE:Custom]
[ADJECTIVE:Initialed/Carved Pictures]
[ADJECTIVE:Worn Smooth]

-Shows weapon is special-

[ADJECTIVE:Target]
[ADJECTIVE:Light trigger]
[ADJECTIVE:Exotic]
[ADJECTIVE:Runed]
[ADJECTIVE:Glowing]
[ADJECTIVE:Sighted]
[ADJECTIVE:Scoped]

-Extras/To Do---------------------------------------------------------------------------------------------

Add Odd propellents for when gunpowder is not avalible; gas ignition (like a potato gun); pressurized gas  (air;CO2;nitrogen);fertilizer+kerosine;Magic;impact explosive (Ex:iodine+ammonia crystals);gun cotten.

Random decriptors (EX:rusty;old;battered;maintained;new;damaged;shoddy;corroded;flawed;experimental;jammed;slow  mecanisim;dirty;tuned;custom;light trigger;marksman;target)

Random revolvers for percussion revolver equation (adams,colt,le matt,tranter,savage,etc)

How impliment buck and ball? Blunt musket cartridges?

Make rifles; Use minie ball?

How to stop an ammo and/or gun appear to be able to be made from wood/bone; Force custom reactions???

Custom buildings

Maybe add scentbottle action.

More fantasy suff. Theriretical/Fantastical Actions, Magic.

Make Carbines and pistols for each style of action and weapon

More experimential actions



Compiled by Featheredragon     
Title: Re: Black Powder Firearms
Post by: Jake on September 19, 2014, 06:17:03 pm
Some fascinating concepts there, but unfortunately most of them would be nigh-impossible to recreate in-engine; I can't even control rates of fire at the moment.
Title: Re: Black Powder Firearms
Post by: Featheredragon on September 19, 2014, 06:41:05 pm
Damn. Rates of fire are kinda essential for most of these to work. I also insist kindly recommend that you replace the shotgun with a blunderbuss. Also though some airguns/pellet guns date very early:
Spoiler (click to show/hide)
I can not seem to find any references to early spring powered firearms. though bullet/stone cross bows also date very early for small game hunting.

Don't know when I will have internet access again so hope this helps.

Also have a link to a amazing site; you will also want to look at their youtube channel:http://www.forgottenweapons.com/rifles/treeby-chain-gun/
Title: Re: Black Powder Firearms
Post by: Jake on September 19, 2014, 07:15:26 pm
The air guns being spring-powered instead of by compressed air was another necessary compromise, because for the life of me I can't figure out how I might go about simulating an air tank without resorting to the dark sourcery of dfhack.

And 'shotgun' instead of 'blunderbuss' came about because everyone who happens to install the mod will immediately understand what a shotgun is and what it's supposed to do; this is also why I went with muskets instead of arquebuses. (Arquebi?  ;) )

Besides, the word 'blunderbuss' conjures up mental pictures of ridiculous-looking weapons resembling a trumpet with a firing mechanism, wielded by bad German stereotypes in old cartoons. And the direct, literal English translation of the original Dutch word is "thunder-pipe", which sounds even sillier and vaguely obscene.
Title: Re: Black Powder Firearms
Post by: Featheredragon on September 20, 2014, 02:45:44 pm
To me a blunderbuss is a crude pipe strapped to a hand-carved stock; A weapon of desperation and no fucks given. A weapon where you can just jam gravel in it and fire. Also I think to most people blunderbusses conjure up images of pirates; not Germans in lederhosen, as I have never heard of or seen such cartoons or stereotypes.

Having the shotgun in there automatically makes me think of a break-action double barrel; which breaks immersion for me; it is like looking up gun mods for skyrim and only finding mods were people add AK-47s and 1911's. (Please stand by; we are experiencing temporary incoherent rage.) Maybe go for a happy medium and call it a scatter gun.

The last thing I want is for this to turn into a typical  "stop liking what I don't like" argument. Its your mod and you can do whatever you want with it. Of course I can always just change the name in the raws; I am just offering suggestions; If you want me to stop just tell me.

Or maybe this all is not necessary and I am too used to trying to stop fights on 4chan.












   
Title: Re: Black Powder Firearms
Post by: Jake on September 20, 2014, 03:11:26 pm
The way I see it, you can always rename it in item_weapon_guns.txt (and remove the sawn-off version) if it bothers you. I have been pondering the idea of introducing a proper fowling-piece, which means I'll have to rename the current shotgun to something else. "Wagon gun", maybe? After all, it's more or less the direct ancestor of the Old West coach-gun.

Say, we haven't had a proper Wild West mod since 40d. Maybe I'll make that my next project.
Title: Re: Black Powder Firearms
Post by: LordBaal on September 22, 2014, 07:23:09 am
Well, for me a blunderbuss is the definition of a dwarf weapon. Might have something to do with Warhammer.
Title: Re: Black Powder Firearms
Post by: Jake on September 22, 2014, 07:45:04 am
Like I said, I have some tentative plans to expand shotgun-type weapons a bit once I hit v1.0. How about we revisit this discussion then?

Oh, and how are you all finding v0.9? Any bugs I should be aware of?
Title: Re: Black Powder Firearms
Post by: Rammok on September 22, 2014, 03:35:27 pm
So I spent some time with Black Powder Firearms. And, I love it. Although I realized it would take hours to merge into Dark Ages. And, the number of reactions required for this mod is quite vast.

I'm planning on refitting a much simplified version of Black Powder Firearms mod for inclusion in a future version of Dark Ages.
Title: Re: Black Powder Firearms
Post by: Jake on September 22, 2014, 03:54:06 pm
So I spent some time with Black Powder Firearms. And, I love it. Although I realized it would take hours to merge into Dark Ages. And, the number of reactions required for this mod is quite vast.
The thing about the reactions, though, is that most of the actually difficult ones are optional; gunpowder and firelocks can both be bought from the caravans, and you can substitute potash for saltpetre.

Quote
I'm planning on refitting a much simplified version of Black Powder Firearms mod for inclusion in a future version of Dark Ages.
Excellent. I look forward to seeing the result.
Title: Re: Black Powder Firearms
Post by: GM-X on September 27, 2014, 08:15:20 pm
So I spent some time with Black Powder Firearms. And, I love it. Although I realized it would take hours to merge into Dark Ages. And, the number of reactions required for this mod is quite vast.
The thing about the reactions, though, is that most of the actually difficult ones are optional; gunpowder and firelocks can both be bought from the caravans, and you can substitute potash for saltpetre.

Quote
I'm planning on refitting a much simplified version of Black Powder Firearms mod for inclusion in a future version of Dark Ages.
Excellent. I look forward to seeing the result.

Exhausting, but complete. It works in adventure mode in a fairly simplistic form: http://www.bay12forums.com/smf/index.php?topic=143540.msg5694117#msg5694117 (http://www.bay12forums.com/smf/index.php?topic=143540.msg5694117#msg5694117)

I did some test firing with lead bullets. It wasn't fantastically powerful, but effective against unarmored opponents.   ???
Title: Re: Black Powder Firearms
Post by: Jake on September 28, 2014, 05:30:03 am
Exhausting, but complete. It works in adventure mode in a fairly simplistic form: http://www.bay12forums.com/smf/index.php?topic=143540.msg5694117#msg5694117 (http://www.bay12forums.com/smf/index.php?topic=143540.msg5694117#msg5694117)
Marvellous. Actually, that reminds me. Can I get a list of everyone who's used bits of this mod for their own projects so I can add you to the Acknowledgements entry in the readme file?

Quote
I did some test firing with lead bullets. It wasn't fantastically powerful, but effective against unarmored opponents.
That's working as intended, then, good.
Title: Re: Black Powder Firearms
Post by: Sprocket809 on September 28, 2014, 08:32:06 am
Left out lead for ammo, and potash could be used as a sub for saltpeter. 5k cloth for cartridges, is a little large. For the spring guns, would need steel for the springs, since other materials would be too brittle, low tensile strength

Actually, potash (or rather pearlash, the purer form of potassium carbonate) isn't really an alternative - It's actually required in the production of saltpeter as a reduction agent (potassium carbonate heated with potassium nitrate to makes a more flammable chemical)
Title: Re: Black Powder Firearms
Post by: Jake on September 28, 2014, 09:30:06 am
Actually, potash (or rather pearlash, the purer form of potassium carbonate) isn't really an alternative - It's actually required in the production of saltpeter as a reduction agent (potassium carbonate heated with potassium nitrate to makes a more flammable chemical)
I know. I ended up using straight potash in the reaction as a compromise because I couldn't think of a good way to make potassium nitrate (sewer brew as a stand-in for aged urine was one idea I kicked around) and I never really got around to taking another look at it. I'm always open to suggestions though.
Title: Re: Black Powder Firearms
Post by: Sprocket809 on September 28, 2014, 12:04:56 pm
Actually, potash (or rather pearlash, the purer form of potassium carbonate) isn't really an alternative - It's actually required in the production of saltpeter as a reduction agent (potassium carbonate heated with potassium nitrate to makes a more flammable chemical)
I know. I ended up using straight potash in the reaction as a compromise because I couldn't think of a good way to make potassium nitrate (sewer brew as a stand-in for aged urine was one idea I kicked around) and I never really got around to taking another look at it. I'm always open to suggestions though.

Saltpeter is actually a mineral in-game, in a mod that I'm working on (a smaller scale one to yours, where guns are less of a priority compared to transmutation alchemy and metallurgy) I used that, with some editing. I'm quite pressed for time right now so I can't give the full details, but I'll send you a message so we could compare notes? I think I've nailed the alchemy part of things but my guns and bullets aren't fully up to scratch yet.
Title: Re: Black Powder Firearms
Post by: Jake on September 28, 2014, 01:15:51 pm
Saltpeter is actually a mineral in-game, in a mod that I'm working on (a smaller scale one to yours, where guns are less of a priority compared to transmutation alchemy and metallurgy) I used that, with some editing.

I'm fully aware of that, but the whole reason Fredd suggested the alternative reaction is that saltpetre deposits are extremely uncommon unless you tinker with the mineral raws like Rammok did for brimstone in Dark Ages.

Quote
I'm quite pressed for time right now so I can't give the full details, but I'll send you a message so we could compare notes? I think I've nailed the alchemy part of things but my guns and bullets aren't fully up to scratch yet.
Sure, why not?
Title: Re: Black Powder Firearms
Post by: Jake on October 01, 2014, 07:00:00 am
Code: [Select]
............................................________........................
....................................,.-‘”...................``~.,..................
.............................,.-”...................................“-.,............
.........................,/...............................................”:,........
.....................,?......................................................\,.....
.................../...........................................................,}....
................./......................................................,:`^`..}....
.............../...................................................,:”........./.....
..............?.....__.........................................:`.........../.....
............./__.(.....“~-,_..............................,:`........../........
.........../(_....”~,_........“~,_....................,:`........_/...........
..........{.._$;_......”=,_.......“-,_.......,.-~-,},.~”;/....}...........
...........((.....*~_.......”=-._......“;,,./`..../”............../............
...,,,___.\`~,......“~.,....................`.....}............../.............
............(....`=-,,.......`........................(......;_,,-”...............
............/.`~,......`-...............................\....../\...................
.............\`~.*-,.....................................|,./.....\,__...........
,,_..........}.>-._\...................................|..............`=~-,....
.....`=~-,_\_......`\,.................................\........................
...................`=~-,,.\,...............................\.......................
................................`:,,...........................`\..............__..
.....................................`=-,...................,%`>--==``.......
........................................_\..........._,-%.......`\...............
...................................,<`.._|_,-&``................`\..............

I cannot believe it took me this long to notice that [PRODUCT_TO_CONTAINER:] screw-up.
Title: Re: Black Powder Firearms
Post by: fasquardon on October 01, 2014, 11:58:52 am
The air guns being spring-powered instead of by compressed air was another necessary compromise, because for the life of me I can't figure out how I might go about simulating an air tank without resorting to the dark sourcery of dfhack.

Why not just make it a component of the gun, along with the bellows.  So a gun would be made of a stock, barrel, tank and a bellows.  The manufacture could be made more or less difficult (in real life making the air tanks was very difficult and expensive, which is why air rifles never caught on). In use, the weapon would work alot like a bow.

fasquardon
Title: Re: Black Powder Firearms
Post by: Rammok on October 01, 2014, 01:09:02 pm
I cannot believe it took me this long to notice that [PRODUCT_TO_CONTAINER:] screw-up.

Looked fine for the Arquebus/Rifle refit I did. There is another issue with reagents having "no_subtype" where it should read "NONE".
Title: Re: Black Powder Firearms
Post by: Jake on October 02, 2014, 05:49:07 am
Well, now that I finally have a computer that can play DF properly, I should be able to get those bugs fixed permanently.
Title: Re: Black Powder Firearms
Post by: Jake on October 05, 2014, 05:10:19 am
Progress update: No errors in worldgen, but the first reaction I tried (wooden rockets, because it was the easiest) appears to run indefinitely without producing anything. Nothing in the error log is giving me any clues as to why. Going to try bullets next.

EDIT: O...kay. The good news is the reaction worked, the bad news is it produced a single bullet and a single cartridge each time.
Title: Re: Black Powder Firearms
Post by: scamtank on October 05, 2014, 05:22:43 am
I can't see any [DOES_NOT_DETERMINE_PRODUCT_AMOUNT] tags. Try using lots and lots of [DOES_NOT_DETERMINE_PRODUCT_AMOUNT] tags.
Title: Re: Black Powder Firearms
Post by: Jake on October 05, 2014, 06:37:45 am
Fixed it! Apparently I needed [PRODUCT:100:60:AMMO:ITEM_AMMO_BULLET_L:METAL:LEAD][PRODUCT_DIMENSION:60], not [PRODUCT:100:1:AMMO:ITEM_AMMO_BULLET_L:METAL:LEAD][PRODUCT_DIMENSION:60].
Title: Re: Black Powder Firearms
Post by: Jake on October 05, 2014, 07:46:49 am
v0.9 is now up at DFFD, first post edited accordingly.
Title: Re: Black Powder Firearms
Post by: NoobKid on October 21, 2014, 11:37:30 pm
v0.9 is now up at DFFD, first post edited accordingly.
Is this mod compatible with 40.13?
Title: Re: Black Powder Firearms
Post by: Jake on October 22, 2014, 04:06:13 am
Is this mod compatible with 40.13?
Yes it is.
Title: Re: Black Powder Firearms
Post by: NoobKid on October 22, 2014, 07:33:36 am
Downloading. Looks awesome.
Title: Re: Black Powder Firearms
Post by: NoobKid on October 22, 2014, 09:19:00 am
Still haven't found a firearm in Adventure Mode. Are they supposed to be super rare even if you give them to all intelligent races?
Title: Re: Black Powder Firearms
Post by: Jake on October 22, 2014, 09:23:05 am
Weapons made in reactions don't seem to show up properly unless added as WEAPON:ITEM_WEAPON_WHATEVER in entity_default.txt.
Title: Re: Black Powder Firearms
Post by: noobnubcakes on December 25, 2014, 12:24:55 pm
[SHOOT_MAXVEL:25000] This number determines rate of fire.
The raw file for weapons states:

[SHOOT_MAXVEL:200]  This is just to make sure a near-weightless object doesn't go faster than the string could possibly go.

Implying that MAXVEL stands for max velocity.

Title: Re: Black Powder Firearms
Post by: bigmac3003 on April 07, 2015, 07:25:41 pm
So, can I get this to work with the current version of DF?

Also don't mean to bump an old thread for such an unimportant question but is jake still around/ developing this?
Title: Re: Black Powder Firearms
Post by: Klisz on April 07, 2015, 09:07:19 pm
So, can I get this to work with the current version of DF?

It works fine with the current version, as far as I can tell.
Title: Re: Black Powder Firearms
Post by: Jake on April 26, 2015, 06:52:07 am
So, can I get this to work with the current version of DF?

Also don't mean to bump an old thread for such an unimportant question but is jake still around/ developing this?
I've been away for a bit dealing with some health and personal issues, but I'm trying to get back into DF now.

The old shotgun is now known as the "wagon gun", in reference to the blunderbuss being carried by stagecoach drivers as a deterrent against highwaymen, until it was replaced by short double-barrelled shotguns often referred to as coachguns. (Can you tell I was playing a lot of Fistful of Frags at the time?) There's a new weapon being introduced called the fowling piece, which is going to have two different kind of ammunition for it if I can make that work, buckshot and birdshot. Same principle as the current buckshot ammo type; large contact area but shallow penetration.

Also, check out today's dev-blog! Parchment, chemical reactions... :D
Title: Re: Black Powder Firearms
Post by: Jake on April 26, 2015, 04:21:45 pm
Double-posting for visibility.

Ladies and gentlemen, it gives me great pleasure to announce that as of a few moments ago, the Black Powder Firearms mod is at version One Point Zero. This also marks the first release where a test worldgen failed to return a single error message!

The previous version's 'shotgun' is now the Wagon Gun, a name inspired by the spiritual successor to the blunderbuss. Complementing it is the fowling piece, which is currently the only gun in BPFA to fire two kinds of ammunition. Buckshot and birdshot are basically the same as the Wagon Gun's ammunition -now renamed grapeshot- but with a greater contact area, shallower penetration and more cartridges per sack of powder. Note also that the pellets are made as a tool, not an ammo type, so adjust your stockpile settings accordingly.
Title: Re: Black Powder Firearms
Post by: Jake on May 03, 2015, 05:23:53 pm
Did a little arena testing just now. I think I made the shotguns too hardcore; even birdshot is crippling if it strikes an unarmoured part of the body. Haven't tested it with zombies yet though.
Title: Re: Black Powder Firearms
Post by: LordBaal on May 04, 2015, 07:44:53 am
This are most excellent news!
Title: Re: Black Powder Firearms
Post by: StupidElves on June 23, 2015, 07:10:13 pm
Nice mod

PTW so that I can get future updates.
Title: Re: Black Powder Firearms
Post by: Salmeuk on June 24, 2015, 05:01:06 pm
Did a little arena testing just now. I think I made the shotguns too hardcore; even birdshot is crippling if it strikes an unarmoured part of the body. Haven't tested it with zombies yet though.

Thank you for this awesome mod! Should I generate a new world in order to play this, or can I use an existing save?
Title: Re: Black Powder Firearms
Post by: Klisz on June 24, 2015, 05:20:04 pm
Did a little arena testing just now. I think I made the shotguns too hardcore; even birdshot is crippling if it strikes an unarmoured part of the body. Haven't tested it with zombies yet though.

Thank you for this awesome mod! Should I generate a new world in order to play this, or can I use an existing save?

You need to gen a new world.
Title: Re: Black Powder Firearms
Post by: Jake on June 24, 2015, 05:22:13 pm
You're very welcome. And that's a good question; I know you can tweak existing reactions without a problem, but inserting whole new ones might be another matter. Back up your current save file before experimenting!
Title: Re: Black Powder Firearms
Post by: Jake on June 25, 2015, 05:01:29 am
Seeing as someone else has been kind enough to necro this thread so I don't have to, I have a quick question for you all.

Would you guys consider it unseemly if I added a Paypal "tip jar" donation link to the first post and/or the DFFD page? It came up when I posted to the DF subreddit announcing the release of V1.0.
Title: Re: Black Powder Firearms
Post by: Foffy123 on June 25, 2015, 01:15:59 pm
Seeing as someone else has been kind enough to necro this thread so I don't have to, I have a quick question for you all.

Would you guys consider it unseemly if I added a Paypal "tip jar" donation link to the first post and/or the DFFD page? It came up when I posted to the DF subreddit announcing the release of V1.0.
Go for it in my opinion, but I would include a link to http://bay12games.com/support.html (http://bay12games.com/support.html) as well.
Title: Re: Black Powder Firearms
Post by: Salmeuk on June 25, 2015, 09:56:01 pm
Hey! I haven't searched through this thread so I'm sorry if this has already been answered, but when I go to create gunpowder instead of produced ten (gunpowder) bags I'm left with one (gunpowder) bag, 9 chunks of gunpowder and 9 empty bags. The 9 bag-less chunks are unusable due to the nature of the cartridge-making reaction.

When my furnace operator goes to perform the reaction, he only picks up one piece of potash, two charcoals, one brimstone and the ten bags.

Any thoughts? I tried both a modded and a fresh install.
Title: Re: Black Powder Firearms
Post by: Jake on June 26, 2015, 05:27:00 am
Huh. That's new. I'll try to reproduce it and get back to you.
Title: Can't get Magma buildings to appear in list
Post by: MantisMan on October 23, 2015, 01:06:20 pm
I noticed that the Gun Magma Forge and the Magma Bullet Mint both use the same exact letter as their non-magma equivalent, so I went into the raws and changed them from F to U and G to L, respectively, but I still can't get those buildings to appear in the list.

I also added the ability to make silver bullets since, y'know, it's the traditional werewolf cure.

Looking at the code, I'm seeing what I think are missing indentations and the odd missing open square bracket in the "two-handed" creature size section of the handguns.

I'm still slowly working on building up to the guns and making the ammo, so I haven't tested it yet. If I'm reading the raws right, they use the speardwarf skill, right?

[Edit] I think the [PERMITTED_BUILDING:GUN_FORGE] entries in the entity_default list needs to have the magma version of the workshops installed on them.

Also, I'm kind of thinking of going into my raws for my current savegame so I can add these things. We don't really need to gen a new world, right? That's just for convenience's sake so that we don't miss any entries, and so that the changes last from one world to the next, right?
Title: Re: Can't get Magma buildings to appear in list
Post by: Jake on October 23, 2015, 01:23:13 pm
I noticed that the Gun Magma Forge and the Magma Bullet Mint both use the same exact letter as their non-magma equivalent, so I went into the raws and changed them from F to U and G to L, respectively, but I still can't get those buildings to appear in the list.
Drat. I could've sworn I fixed that.

Quote
Looking at the code, I'm seeing what I think are missing indentations and the odd missing open square bracket in the "two-handed" creature size section of the handguns.

I'm still slowly working on building up to the guns and making the ammo, so I haven't tested it yet. If I'm reading the raws right, they use the speardwarf skill, right?
I'll double-check the code as soon as possible. And it depends; rifles and muskets use the speardwarf skill for melee, but everything else uses MISC_WEAPON... unless the code's buggered.

And apologies for the lack of activity lately, everyone; I'm currently stuck without a PC that can run DF. Maybe I should look into that donation link...
Title: Re: Black Powder Firearms
Post by: LordBaal on October 23, 2015, 01:30:02 pm
Is such a shame Toady wouldn't go for this on his game. Crude/early firearms would add a more dwarfy look to the game. And it would be interesting if somewhat tech progression gets implemented so you have to wait years of development to get them.
Title: Re: Black Powder Firearms
Post by: MantisMan on October 24, 2015, 12:33:07 am
So, I made the two changes I mentioned in my last post, and the magma versions of those workshops are showing up on the screen.

I'm having a tricky time getting a gun industry up and running again, though. It's those damn werebeast attacks, combined with my dwarves running toward the weretortise instead of away and in their burrows safe behind hatch covers and two layers of cage traps (assuming forgotten beasts aren't [TRAP_AVOID] and [BUILDING_DESTROYER]).

I picked a map with iron, flux, and plenty of trees, though, so it should move along pretty well once it gets going.
Title: Re: Black Powder Firearms
Post by: MantisMan on October 28, 2015, 11:11:38 pm
There seems to be a bug with the Gunsmith's Magma Forge where, after I make a firelock, I'm able to continually make large and small firelocks and springlocks without requiring any reagents.

Looking at the entries in the reactions_guns.txt raw, I can't see where the issue could be.

[REACTION:FIRELOCK_L]
   [NAME:forge large firelocks]
   [BUILDING:GUN_FORGE:CUSTOM_SHIFT_F]
   [BUILDING:GUN_MAGMA:CUSTOM_SHIFT_F]
   [REAGENT:150:BAR:NO_SUBTYPE:METAL:STEEL]
   [PRODUCT:100:6:TOOL:ITEM_TOOL_FIRELOCK_L:METAL:STEEL]
   [FUEL]
   [SKILL:METALCRAFT]


My guess at the moment is that right now CUSTOM_F and CUSTOM_SHIFT_F are both hotkeys for building an existing building. (I changed the Magma Gunforge hotkey to F instead of f so that it would show up on the workshop screen.)
Title: Re: Black Powder Firearms
Post by: Jake on December 01, 2015, 08:21:36 pm
I'm looking at the feature list for .42 right now. Parchment is in, crafting items from multiple reagents will probably create less worldgen weirdness...

I'm just waiting on a new power supply for my new gaming rig now.
Title: Re: Black Powder Firearms
Post by: Just Some Guy on January 16, 2016, 07:35:36 pm
Hey, any progress?
Title: Re: Black Powder Firearms
Post by: Jake on January 17, 2016, 11:17:52 am
I'm afraid not. I've been dealing with some health issues these last couple of months that I'd rather not go into in detail.
Title: Re: Black Powder Firearms
Post by: StupidElves on January 20, 2016, 11:09:24 pm
That's cool bro. Get better soon, dude.
Title: Re: Black Powder Firearms
Post by: MantisMan on November 26, 2016, 06:09:40 pm
I've been busy with other life stuff, so I haven't been playing the game much. I still have my "black powder" game backed up in a folder, but I don't remember what the status of the guns, workshops, and ammo are. Nor do I remember exactly what tweaks I was making to the mod files.

Here's hoping that your health has been getting better.
Title: Re: Black Powder Firearms
Post by: tovRobi on December 13, 2016, 09:31:32 am
I tried to instal this mod on Starter Pack 0.43.03-r09. Copied all files to raw\objects and copied that text in description to entity_default.txt for dwarfs. Started new fortress in new world but nothing changed. What have I done wrong?
Title: Re: Black Powder Firearms
Post by: Jake on December 13, 2016, 09:38:06 am
I tried to instal this mod on Starter Pack 0.43.03-r09. Copied all files to raw\objects and copied that text in description to entity_default.txt for dwarfs. Started new fortress in new world but nothing changed. What have I done wrong?
Check the error logs, see if there's anything with "ITEM_WEAPON" and/or "ITEM_AMMO" in there. If you find some, C&P it and we'll go from there.
Title: Re: Black Powder Firearms
Post by: tovRobi on March 25, 2017, 04:03:27 pm
Can I in adventurer mode turn off the automatic reload? After the shot, the enemy manages to run up and repeatedly strike until the character reloads the gun.
Title: Re: Black Powder Firearms
Post by: Jake on March 25, 2017, 08:06:42 pm
Can I in adventurer mode turn off the automatic reload? After the shot, the enemy manages to run up and repeatedly strike until the character reloads the gun.
No idea, sorry. I've barely ever played Adventure Mode.
Title: Re: Black Powder Firearms
Post by: tovRobi on March 26, 2017, 06:33:28 am
Bad for me then.  :( But it have god potencial in this mode. Great damage but one-shot weapon because of the reload time.
P.S. The download link is gone?
Title: Re: Black Powder Firearms
Post by: Jake on March 26, 2017, 09:47:28 am
Sorry, slight case of link rot. This URL works: http://dffd.bay12games.com/file.php?id=4418
Title: Re: Black Powder Firearms
Post by: Vailnoff on April 12, 2017, 05:19:59 am
For some reason, this mod isn't working with my world. I've added the files to the raws, I've added the required text to the entity_default.txt, and yet when I start a fortress in this world, none of the workshops are available! The only change I made to the files was changing things like [ITEM_WEAPON:ITEM_WEAPON_MUSKET] to [WEAPON:ITEM_WEAPON_MUSKET], but I can't see how that would cause the mod to not work.
Title: Re: Black Powder Firearms
Post by: Jake on April 12, 2017, 05:58:55 am
For some reason, this mod isn't working with my world. I've added the files to the raws, I've added the required text to the entity_default.txt, and yet when I start a fortress in this world, none of the workshops are available! The only change I made to the files was changing things like [ITEM_WEAPON:ITEM_WEAPON_MUSKET] to [WEAPON:ITEM_WEAPON_MUSKET], but I can't see how that would cause the mod to not work.
You do mean you're doing that in entity_default.txt, right?
Title: Re: Black Powder Firearms
Post by: Vailnoff on April 12, 2017, 06:12:19 am
Yes.
Title: Re: Black Powder Firearms
Post by: Jake on April 12, 2017, 06:18:20 am
Hmmm. Can you find the error log?
Title: Re: Black Powder Firearms
Post by: Vailnoff on April 12, 2017, 06:22:13 am
Here.
Spoiler (click to show/hide)
Title: Re: Black Powder Firearms
Post by: Vailnoff on April 13, 2017, 02:13:43 pm
Not sure if this helps but for some reason, although the mod doesn't work on any of my worlds, when I go into the default/raws option in the object testing arena, it does work.
Title: Re: Black Powder Firearms
Post by: Jake on April 13, 2017, 02:38:45 pm
Unless reaction_guns.txt is missing from ~/raw/objects, I'm at something of a loss.
Title: Re: Black Powder Firearms
Post by: jettsnake on April 22, 2017, 11:29:05 pm
I believe I've found an extremely minor bug, in the raw for the sawn-off shotgun the TWO_HANDED token is missing the first bracket.

You're welcome, the mod is rescued, disaster avoided.

EDIT: RED ALERT!!! THERE ARE MISSING BRACKETS ON THE PISTOL TWO_HANDED AS WELL
Title: Re: Black Powder Firearms
Post by: MantisMan on August 05, 2017, 09:13:43 pm
For some reason, this mod isn't working with my world. [...] ...none of the workshops are available! The only change I made to the files was changing things like [ITEM_WEAPON:ITEM_WEAPON_MUSKET] to [WEAPON:ITEM_WEAPON_MUSKET], but I can't see how that would cause the mod to not work.

I think I worked that out a couple of pages ago. Try going back to reply #314 in this thread and reading forward from there. I was posting the code and changes I was making. I don't know if the changes were included in an update to the mod.
Title: Re: Black Powder Firearms
Post by: Yagi on July 12, 2019, 04:17:36 pm
Apologies for a reply years later, but I cannot, for the life of me, seem to be able to get this to work, either with the current version, 0.40.24, current or newly generated world (I even went into the raws for the saves and made sure all the permissions and reactions were there). Nothing shows up in the workshop menu, the weapons don't exist in the Arena.

EDIT: I found out what I was doing wrong.
Title: Re: Black Powder Firearms
Post by: tovRobi on April 15, 2020, 10:23:04 am
Does this mod works with v47?