Black Powder Guns adds muzzle-loading firearms to the Toolset. It is intended for builders who want to include guns but don't want to make them a major part of the adventure. The package includes:
VERSION 1
guns_core.hak -- the core of the system, including models and scripts
guns_blueprints.erf -- all blueprints are included in this hak, so that the system will be customizable. The samples include important variables, without which the scripts won't work: see the documentation.
guns_readme.txt and guns_documentation.txt Everything you want to know, and more.
Add guns_core.hak to your hak folder and your module, then import guns_blueprints.erf into your module. Be sure to set gun_mod_def_equ as your OnPlayerEquipItem script under Events. You'll then find guns and ammunition in the Toolset.
Version 1 does not overwrite any models used in any version of NWN or CEP to date, and should be fully compatible with them.
VERSION 2: adds sling-based pistols, which can be used one-handed.
Includes guns2_core.hak and guns2_blueprints erf, with documentation. This version also includes a separate erf file, guns2_v1_to_v2, which will add pistols to your blueprints without overwriting version 1 guns or ammunition which you may have customized.
Be sure to set gun2_mod_def_equ as your OnPlayerEquipItem script under Events. This script revision adds support for sling-based pistols.
Version 2 overwrites the "Frost bullet" visual effect, but should otherwise be compatible with NWN and CEP. It uses the sling animation for pistols.
***********************************
The Black Powder Guns system was inspired by D20 Modern (http://nwvault.ign.com/View.php?view=Modules.Detail&id=5355): if this comparatively simple hak interests you, try the D20mm team's much more flexible system.
NOTE: if you are adding the Black Powder Guns system to a CEP 2.1 module, please install the unofficial CEP21ItemActivate package included in these packages. This addresses a bug with tag-based scripting in CEP 2.1, corrected in CEP 2.2.
***************************************
December 20 2008: I have uploaded a corrected version of the hak files for both versions. The new version addresses problems with guns or ammunition purchased from merchants, and also corrects an error which allowed crossbows to fire gun ammunition.
Here are the current updates! Version 1 is a correction of the original package, adding gunsmoke visual effects and correcting the scripting error which piotr krizka identified. Version 2 adds sling-based pistols. If you update a module from Version 1 to Version 2, I recommend using the guns2_v1_to_v2.erf file rather than the full blueprints erf. The full erf file would overwrite any modifications you've made to ammunition or guns; the update version won't. Also be sure, if you update a module, that you've installed the guns2... hak and added the gun2.. version of the OnEquip script to your Events tab. I'm keeping Version 1 available; it's more completely compatible, and the crossbow animation is more satisfactory. If you'd like to update the hak, simply replace your existing guns_core.hak with the new version included in the Version 1 package. Thank you all for your help! Let me know if you find other errors. I still have on my "to do" list the ammunition pouch malfunction Ranger_SG identified; does anyone have suggestions?
Posted by Gylfi at 2008-12-0717:20:48
piotr krizka, Thank you very much for your help! I've reproduced the problem you found, and traced it to my "OnPlayerEquip" script, which I've now corrected. I'm hoping that will fix it. Let me know if one of my new versions works better for you -- I very much appreciate your calling my attention to this error in my script.
Posted by piotr at 00:32:39 Voted10.00
Yes, it is installed at the right place and all... But it seems it does not work at all in my modules. There can be two reasons, I think : 1 - I have a french version of NWN 2 - I use other haks in my mods, so perhaps there are conflicts between them... So, I tested it again with your module using only your hak, and the problem was slightly different, but still existed. When a player has bolts equiped in his inventory and then equips himself with a gun, he unequips the bolts, but can nevertheless use them to shoot, even if they have been automaticaly unequiped by the "gun_mod_def_equ" script. Please, just try and tell me if it does the same with you... Thanks again :) Piotr Krizka
Posted by Gylfi at 2008-12-0106:14:16
piotr krizka, Thank you very much for catching this. Could you post more details? Just to check: have you installed "gun_mod_def_equ" in the "OnPlayerEquipItem" slot of the Events tab on Module Properties for the module you're testing? That's the script which is supposed to keep crossbow bolts from firing in guns; if it's not working for you, I need to figure out why.
Posted by piotr at 02:28:02 Voted10.00
While testing this (great) hakpak, I noticed a small, but ennoying problem : Characters can use crossbow bolts to shoot with the black powder guns ! In fact I think this is the main problem with the hackpak, since it makes the bullets useless since they are more expensive than bolts, and guns are not supposed to work with bolts !
Posted by Raven_Blood at 17:47:19 Voted10.00
well it all sounds good to me :) do take your time. well be ready when its ready im sure (i am at least)
Posted by Gylfi at 2008-11-3016:30:26
I've had less time free to work on Version 2 than I'd hoped, so I probably won't release it till the end of the week; but I don't want to rush testing. Meanwhile, here's what I'm thinking of. Do you have comments or suggestions? - I'm going to post two versions, one with sling-based pistols and one without. Everything developed under the non-sling version will also work fine in the sling-pistol version; but I'll have to overwrite a sling bullet vfx, and I want to keep one version fully compatible with NWN and CEP. - I'm planning to overwrite the Ice Bullet vfx file for sling-based pistols. It came down to that or acid, and Farel's Gold (which uses acid) seems to turn up often. - The firing animation for slings looks strange with pistols; but they look great carried with a torch. - I'm revising the "bullet pouch" scripts so that they will test whether a sling-based pistol or a crossbow-based gun is equipped, and will load the proper ammunition. That means a single pouch of bullets will work with either. Do you have any suggestions? Thank you again for your help! Version 2 coming soon.
Posted by boodah at on11/26/08
Absolutely great. And comes with one of the best and most entertaining demo mods I ever saw for a hak. Very useful for Warhammer-like modules.
Posted by Raven_Blood at 17:55:08 Voted10.00
well thats all i wanted to hear really lol i had figured as much but i figured id give it a try anyhow :) explaining the specifics to me helped out too, now i *really* know how hard it would be. If you ask me, using the slings for an alternative look for a pistol would look great, but i consider all races involved with this. meaning all the little races which may (or may not) have the need to handle a small gun as a two handed weapon. i will agree that it would look really cool, but if all fails i say what you have now works good enough. As for that primer flash idea, yeah! if you could get that in sometime down the road that'd be really awesome :O thats something willing to wait for as an idea.
Posted by Gylfi at 2008-11-2317:16:57
Raven_Blood, I'm planning to include a slightly modified vfx for the sling pistols; I think it won't be as satisfactory, because it's tied to the sling animation so the point where the smoke turns up isn't always where I'd like it. (With the crossbow animation, the bow is pointed and then fired; with the sling animation, the vfx fires somewhere along the curve as the sling is thrown overhand.) At this point I don't see a way to introduce more smoke effects; the problem is that in order to make the smoke effect fire at the same time as the weapon is fired, it needs to be tied to the bullet type. These are built into the ammunitiontypes.2da; so what I've done, for example, is make a new vfx model for the "sonic bolts" category. Each new vfx has to replace one existing model. I have thought about a primer flash for the locks, which would be fun. The downside is that, at many distances, a realistic primer flash wouldn't be visible, and I don't want to be adding enough detail that it interferes with the game. I could do this later, in a later update; we'll see what people think. I'm realizing that one of the things which is slowing my final version is that there *is* another way to do the pistols. I could base them on light crossbows; then the animation would be better. The problem is, I'd have to edit the base items 2da file to make all light crossbows one-handed. That could be unbalancing; for example, it would let people fire crossbows while also holding a shield. It would also be high maintenance; lots of haks (including CEP) include custom base items files already, so including crossbow-based pistols would require that people edit their haks. On balance, that doesn't seem like a good idea. I think. More later this week, I hope. Depends on real life.