[Request] Slug shotgun

  • 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/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

ChairmanMurder[Forge]

FNG / Fresh Meat
Apr 24, 2011
480
107
0
34
Sunny, Sunny California
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.
 

ChairmanMurder[Forge]

FNG / Fresh Meat
Apr 24, 2011
480
107
0
34
Sunny, Sunny California
Took the mutator out for a spin and checked the wiki. I was looking more for a shotgun that solely fires slugs, and the effect to be basically like a lot of regularshot all clumped together. (I know that's not what a slug is, but the closest I could think of).

Thanks for the suggestion, though.
 
Last edited:

Trololololololololololo

FNG / Fresh Meat
May 6, 2010
110
35
0
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:

ChairmanMurder[Forge]

FNG / Fresh Meat
Apr 24, 2011
480
107
0
34
Sunny, Sunny California
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.
 

halbridious

FNG / Fresh Meat
Jan 6, 2011
1,770
211
0
Michigan (USA)
I think you have to create a new selection of code, one that still calls the same meshes and anims but changes the package/weapon name - should be right in the weapon code now really, you just have to change kfmod.Shotgun to MyGun.SlugGun or whatever. AFAIK anyways.
 

halbridious

FNG / Fresh Meat
Jan 6, 2011
1,770
211
0
Michigan (USA)
as far as i know, make sure that its named differently and it doesn't care that the pieces used are the same. It should be pretty simple really.
 

ChairmanMurder[Forge]

FNG / Fresh Meat
Apr 24, 2011
480
107
0
34
Sunny, Sunny California
For the life of me, still can't make heads or tails on how to do this.

See, I don't want to modify the existing shotgun to fire slugs/tight pattern, but rather I want it to be a standalone weapon. Benjamin's guide does give me some good insight on how to modify properties of existing weapons, but not create a new one.
 

ro_sauce

FNG / Fresh Meat
Sep 26, 2007
3,135
329
0
bwhgaming.com
maybe u can modify the moss12 to fit your own personal desires? (i think you can do that for personal use, just dont give to public)
i'm actually changing a few settings on that gun for my own server.
 

ChairmanMurder[Forge]

FNG / Fresh Meat
Apr 24, 2011
480
107
0
34
Sunny, Sunny California
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:

ro_sauce

FNG / Fresh Meat
Sep 26, 2007
3,135
329
0
bwhgaming.com
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
 

HaTeMe

FNG / Fresh Meat
Nov 20, 2009
2,675
549
0
Behind You!
So basically you want it to be exactly like normal shotgun except with near-zero spread and some changes in the ammo/cost? I made this and its not that different from the normal shotgun, do you want the kickback to be modifed so they really go flying?