A stupid question about firearms

Users who are viewing this thread

archlurps

Recruit
I found out how M&B modding works a few weeks ago, and I've been planning to start working on a mod since, but I always get frustrated when I think of all the things that rely on each other.

So I've come to the conclusion that I need to start out with something small.

Even so, I keep running into problems...

Could some lovely person tell me what they'd do to make a mod like this:

native, but with a totally unfair pistol sold in every shop but not found from any npc. The pistol would be a lot like a modern pistol on semiautomatic.

The problem I get is that I can't find a model and texture for it, so I can't even start. Similar problems would probably also soon occur.

thanks. Even just for not flaming me.
 
if you look at my "FREE stuff" thread i have a download with a submachine gun and 9mm pistol and a couple other rifle modles  you could use
 
thanks a million clayton.

as for asking hokieBT, I take it he's a busy fellow as it is, I don't want to bother him with my small request since almost anyone with modding sense could help me.

Although I was thinking more along the lines of a tutorial. I take it this is a really simple mod. DO correct me if I'm wrong though.
 
It's not really a small request.  Currently the ranged weapon system is set up for single fire reload weapons.  Also ammo is a thing to think about.  Soon I'll be looking to do the same, the mod I'm working on needs semis and autos too...  I have to look at the starwars mod again and see what they did...
 
isn't there just a rather simple flag (or whatever parts of tuples are called) that dictates how many times a weapon can be shot? max_ammo or something?

itp_type_pistol

difficulty -- Value.
The minimum STR score needed to be able to use this pistol.

spd_rtng -- Value.
The pistol's reloading speed. IE, how fast a troop will be able to reload the pistol and aim it again.

shoot_speed -- Value.
The speed at which ammunition from this pistol flies through the air.

thrust_damage -- Value, damage type.
The base damage and damage type inflicted by hits from this pistol.

max_ammo -- Value.
The number of bullets that can be fired from this pistol before it must be reloaded.

accuracy -- Percentage value.
The chance of a shot flying exactly at the troop's aiming point. 100 represents a 100% chance, lower values will greatly decrease the chance of a hit.

there is if this quote of the module system documentation is to date. Or do you mean it'd load one piece of ammo and be able to shoot however many the "clip" holds? That wouldn't be a problem in my "mod" (in quotes because it'd be more like an experiment than anything that'll ever be ready)

very true though, the ammo must also be included and sold at shops.

This is what makes modding so hard to approach - even if you just want to make a seemingly simple "stress reliever" mod, you get stuck from the very first step. I know firearms aren't the simplest thing to start with, but there are firearms in a lot of mods already, surely it's not that hard by now?
 
Star Wars currently has semi-auto weapons, you can just increase the max ammo so you can fire multiple times between reloading.  I don't know how to do fully automatic weapons yet, but I assume it would be possible to code it somehow....

There is already a flintlock pistol and cartridges in the game, but currently they don't appear in shops for two reasons:
1) They don't have the merchandise flag (so you need to use module system or item editor to give it the merchandise flag)
2) There is not a trigger to refresh pistols/muskets/bullets (see this post for more info http://forums.taleworlds.com/index.php/topic,58806.msg1519925.html#msg1519925 )

extra gun models are around, you can use the those models that clayton117 mentioned above or Kon_Air created a modern firearm pack a few years ago that you'd just need to import to a 1.x BRF.
https://www.mbrepository.com/file.php?cid=9&id=313

edit:  actually, I think the flintlock pistol already has the merchandise flag, so you'd just need to modify the trigger in Step #2
 
refresh is another flag right?

Well I'll compare to an existing item to see what's missing. Thanks!

EDIT: scratch that and slap me. It's further in the thread. sorry

EDIT2: works, now I have a ridiculously overpowered flintlock pistol in a mod.

easier than I thought, but at least I can pretend to myself that it's something I made myself. Then again, the bulk of mods is stuff like this, changing the items available to suit the scenery, although in that case you'll have to make your own models and such, which adds in another couple of steps. scripting is a whole other thing I'm sure, though.

One more question though: is it possible to make the reticles close in faster? the slowly moving reticles suit a bow well, but not a modern firearm.

 
The reticule closing speed will increase if you increase the speed of the gun in module_items.  I found a way to make a pseudoautomatic gun. If you set the accuracy over 100 the reticule will shrink and then invert itself.  So if you hold the shot too long it makes the accuracy decrease again. But it greatly increases how fast you can fire accurately. You just need a little timing.
 
Also increase the user's firearm skill.  Just like with all proficiencies, it makes you better at using the weapon all round.


My personal question, I have not done much with firearms, but how do you define what ammo it uses?
 
I'm no pro lol... but I'm pretty sure that's not something you define yourself, it seems to be one step more hardcoded.

crossbows use ammo that's flagged as bolts, firearms ammo that's flagged as bullets (or cartridges? can't remember the flag name), bows as arrows, so on.
 
I think the only way to define specific ammo would be to use slots somehow. I haven't tried it myself yet. I did use a global variable to define max ammo for a cannon, but it still uses up cartridges when it fires.
 
ya, there's a flag for bullets.  Will try that out.  Guess I have to mark the weapon as a musket?
 
Back
Top Bottom