Need help simply adding working firearms.

Users who are viewing this thread

Aelok

Recruit
I'm pretty much a newb when it comes to editing the game. If you can help me, try and be detailed :smile:

I am not looking for a mod that adds firearms with a whole bunch of other stuff, I simply want guns and the skill to use them, how would I go about doing that? I'm sorry if there is a mod for this already, I've done quite a bit of searching and reading but what I've found seems to be pretty out dated or not what i'm looking for. I know there are mods with firearms, but they all change the game in other ways as well, and thats not what I'm wanting.

A simple flintlock pistol and maybe a musket, thats really all i'm looking for. I think once I got those added I could edit the flintlock pistol myself and make some sort of 'revolver', if only by function and not appearance.
Any help would be appreciated.
 
Go to your module.ini of your Native map, and look for wp_firearms. The value for this will be a 0. Change this to 1 and your character will have the proficiency of firearms.

Also you will need to enable the flintlock pistol in Native, you can try that with the Morgh's edit tools or any item editor actually. Also there are some OSP packs with muskets, so you can add them yourself at your liking.

That means you need to enable the item as merchandise, so you can buy it in shops. This also counts for cartridges.
 
I have the wp_firearms set to 1 and it now displays the proficiency and can be leveled.

As for adding the flintlock and ammo to the game, I thought there was some trick to that? When I find them in Morgh's item editor they are already ticked to be merchandise by default, but warband doesn't have these items listed for sale by merchants. Surely theres something else I need to do?

As for the extent of my editing prowess, thats basically me copying an existing weapon and adjusting it's values in the item editor... lol
Back in the day I managed to get the flintlock pistol in game and sold by merchants, but that too was with help from the forums.
When I was doing it back then, I recall the flintlock pistol not having any sound when I fired it, is that still an issue?

What is an OSP pack?
 
Aelok said:
I have the wp_firearms set to 1 and it now displays the proficiency and can be leveled.

As for adding the flintlock and ammo to the game, I thought there was some trick to that? When I find them in Morgh's item editor they are already ticked to be merchandise by default, but warband doesn't have these items listed for sale by merchants. Surely theres something else I need to do?

As for the extent of my editing prowess, thats basically me copying an existing weapon and adjusting it's values in the item editor... lol
Back in the day I managed to get the flintlock pistol in game and sold by merchants, but that too was with help from the forums.
When I was doing it back then, I recall the flintlock pistol not having any sound when I fired it, is that still an issue?

What is an OSP pack?

An OSP pack contains out of models and textures that are available for everyone to use in their Mount&Blade. Mods make also use of them. You can find them if you do a little searching.

Maybe you can try to restart your game, and then they should work. Or wait some days ingame should help too.
 
There has got to be more to it than simply making it a merchandise and allowing the skill proficiency.
When I opened the item editor on Native and found the flintlock pistol, it was already set as merchandise by default, but the flintlock pistol is not ever found within the unedited version of the game.

I remember that whenever a new item was added to the game, it took a few days for the shops to carry them. That doesn't apply here [I don't think], because I've played M&B for 2+ in-game years on some characters and never found a flintlock pistol in the shops, considering the item details lists it as merchandise. So there has got to be something else I need to do to make it available.
 
You can't find it because the pistol entry in module_items.py is commented out by default. If you uncomment it then you can have pistols in game and buy them from merchants.
 
ithilienranger said:
You can't find it because the pistol entry in module_items.py is commented out by default. If you uncomment it then you can have pistols in game and buy them from merchants.
Awesome, now how would I go about doing this, "uncommenting"?
 
Download the Module System and set up module_info.py to point to your Warband installation (see other threads on downloading Python, etc). However, the flintlock pistol is an already enabled entry in the MS, it simply won't show up as merchandise since the game doesn't know how to go about adding their type to merchants. Open up module_triggers.py and scroll down to the following:
Code:
# Refresh Weapon sellers
  (0.0, 0, 24.0, [], [
                      (reset_item_probabilities,100),
                      (set_merchandise_modifier_quality,150),
                      (try_for_range,reg(2),weapon_merchants_begin,weapon_merchants_end),
                        (store_sub, ":cur_town", reg2, weapon_merchants_begin),
                        (val_add, ":cur_town", towns_begin),
                        (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_one_handed_wpn,5),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_two_handed_wpn,5),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_polearm,5),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_shield,6),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_bow,4),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_crossbow,3),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_thrown,5),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_arrows,2),
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_bolts,2),
                        (troop_ensure_inventory_space,reg(2),merchant_inventory_space),
                        (troop_sort_inventory, reg(2)),
                        (store_troop_gold, reg(6),reg(2)),
                        (lt,reg(6),900),
                        (store_random_in_range,":new_gold",200,400),
                      (call_script, "script_troop_add_gold", reg(2), ":new_gold"),
                      (end_try,0),
                     ]),
Basically, this says that every 24 hours, merchandise of various types is added to the weaponsmith of each town, their inventory space is sorted (leaving enough spaces for you to sell), and gold is added if they're below a margin of 900. This is repeated for every weaponsmith in every city.

Code:
(troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_thrown,5),
This line adds 5 thrown items to that merchant. Don't worry about the :cur_faction - items are not restricted by faction by default. Open up header_items.py - a list of all types of items are shown under #item flags. To make sure your pistol (and the corresponding ammunition) shows up as merchandise, ensure they are flagged with itp_merchandise (this is already the case), and add its type to the list of merchandise to add. So you would have the following code:
Code:
                        (troop_add_merchandise_with_faction,reg(2), ":cur_faction",itp_type_bolts,2),
                        (troop_add_merchandise,":cur_merchant",itp_type_musket,1),
                        (troop_add_merchandise,":cur_merchant", itp_type_pistol,1),
                        (troop_add_merchandise,":cur_merchant", itp_type_bullets,1),
                        (troop_ensure_inventory_space,reg(2),merchant_inventory_space),

As a side note, if you wanted a revolver, modify the max_ammo(1) flag for the flintlock pistol entry in module_items.py to whatever value you want.
 
Oh, sorry I was wrong about the comments. I was going off of my memory which isn't the greatest. Somebody has given you the correct info.
 
I was wondering, when this is done could you post it as a mod, as this sounds like it will be quite cool, and i agree that i cant find a gun mod either
 
This is post is several months old. There are plenty of mods with firearms, including the soon to be released DLC and the mod that I'm working on. Keep in mind that if you just want the flintlock in 1.143, the relevant merchant restocking code has been moved to the bottom of module_scripts rather than in module_triggers.
 
Somebody said:
This is post is several months old. There are plenty of mods with firearms, including the soon to be released DLC and the mod that I'm working on. Keep in mind that if you just want the flintlock in 1.143, the relevant merchant restocking code has been moved to the bottom of module_scripts rather than in module_triggers.

You still work on TEatRC?
 
Somebody said:
This is post is several months old. There are plenty of mods with firearms, including the soon to be released DLC and the mod that I'm working on. Keep in mind that if you just want the flintlock in 1.143, the relevant merchant restocking code has been moved to the bottom of module_scripts rather than in module_triggers.

I know but all the mods i find totally overhaul the game WARBAND, i dont want the dlc to be honest as its said there working on a whole new m&b 3 at the mo, so i was hoping that it would be uploaded and not tottaly overhaul the game
 
lithorium said:
Somebody said:
This is post is several months old. There are plenty of mods with firearms, including the soon to be released DLC and the mod that I'm working on. Keep in mind that if you just want the flintlock in 1.143, the relevant merchant restocking code has been moved to the bottom of module_scripts rather than in module_triggers.

I know but all the mods i find totally overhaul the game WARBAND, i dont want the dlc to be honest as its said there working on a whole new m&b 3 at the mo, so i was hoping that it would be uploaded and not tottaly overhaul the game
If that's all you want, download this little mod. It adds several firearms that you can buy and shoot, and nothing else.
 
Back
Top Bottom