• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

[Request] Slug shotgun

Don't know if this is the right place to ask for this, since I think it's mostly coding, but yeah. Might as well ask here.

Simply put, I'm wondering how to make a slug-firing shotgun using the same sounds, animations, textures, models, etc, of the standard pump shotgun. I was playing on a mod server a while back (WPC? I forget) and they had a shotgun that fired pellets with zero (or very, very little) spread. The result was... flying specimens.

So I'm wondering if anyone with the programming and mutator-creating knowledge could make one for me. Or, better yet, give me some pointers on how to make it. I know how to compile a basic mutator. I kind of have an idea of classes and stuff from Benjamin's weapon mod guide, but past that I'm lost.

Uh... for the most part the slug gun will be almost identical to the regular shotgun, but default max ammo would be 40, initial buy ammo would be 20, pickup rounds from ammo boxes would be a mere 5, cost would be 650 dosh, zero/very little spread, and it would fire 5 pellets, not the usual 7.

And I guess name would just be Slug Gun, haha.

Thanks in advance for any mutators or advice that comes from this thread.
 
I can give instructions on how to modify the current shotgun, but i dont know how to create a new one or parallel one, or anything besides that, sorry.

Of what i understand of a slug shotgun is that it fires only one projectile, but you can choose how many with this code

class'ShotgunFire'.default.ProjPerFire = 8;

And for the spread, this one is what i use in my realism mini mod, its very close to the real spread of 00 buckshot, for slug i would suggest a value of around 150 or so, maybe less for rifled barrel and slug.

class'KFShotgunFire'.default.Spread = 300.0;

There is a shotgun in WTFmut that allows the player to switch from buckshot to slugs by reloading.
 
Last edited:
Upvote 0
Yeah, I sort of get how to toy with class variables and such to get the stats I want, it's just that I don't know how to make a new shotgun that exists side-by-side with the standard shotgun.

And my so-called sluggun has about the same spread as a real-life shotgun with a regular choke and barrel, but, in game world, we all know that shotguns are worthless past thirty feet. Haha. Hence why I call it a slug gun when it's really just a shotgun with a tight pattern.
 
Upvote 0
Hmm. that cuold wokr, actually. The stock shotgun can be that, and the Moss12 can do slugs. Er. How do you decompile the mutator so I can edit? Sorry, if you couldn't tell, I'm completely new to this.

EDIT: On the other hand, The reason I prefer two stock shotguns (one with shot, other with slugs) is so I don't have to worry about version mismatches. For example, if someone tried to join my server with the modded Moss12, they'll have a bunch of trouble trying to get into a server using a stock Moss12.
 
Last edited:
Upvote 0
i just tried editing the moss12 (magcapacity/damage) and got tons of compiling errors, so i guess u cant do it that way.

the way to extract:
open kffed, in actor browser open moss12mut.u, then open the weaponpickup, edit sccript, the toools->export all sccripts.

there will be a directory called moss12mut, the uc files are in there.

to compile changes:
edit killingfloor.ini, add editpackages=moss12mut to the editpackages area (scroll down a lot to find it)

then open a command window in system, type:
ucc make
 
Upvote 0