Need help setting up custom keybinds for weapon switching

  • 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/

seq

FNG / Fresh Meat
Nov 22, 2009
47
6
0
I'm trying to figure out how to set up custom keybinds to counter the fact that having three primary weapons is very cumbersome in this current weapon group/switching system.

Let's say for example that I would want to bind Q to always equip the boomstick (if available). I'm fairly familiar with setting up KFInput.ini but I haven't found which command can execute a weapon switch. I don't mean SwitchWeaponGroup or GBA_SwitchWeapon1, but switching to a specific weapon. If I manage to figure out which command that is I'm guessing I only need to find the weapon class name. I've googled a bit and found people listing some weapon names in the format of 'KFWeapDef_Winchester1894' so I'm guessing that's something you can find in the SDK?

Has anyone tinkered anything with this? I've been playing around in the console but haven't found any commands that seem to fit the bill, and I haven't really been working with the Unreal engines since the Unreal 1 and UT99 days so I'm a bit lost. My next step is looking through the SDK but I figured I could post a question here in case someone already has the solution to my problem.

Thanks in advance.
 
Last edited:

Pharrahnox

Active member
Feb 3, 2016
268
71
28
Cranny mate
I can't really help you since I haven't dealt with that sort of thing before, but I can tell you how to figure out the name of the class of the weapons. If you have the SDK installed, you can find the source code for KF2 in the folder: C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\Develop ment\Src. In KFGameContent, you'll find the weapon classes, which start with KFWeap_, and in KFGame you'll find the weapon definition classes, which start with KFWeapDef_. The weapon definition is only really used by the trader, the weapon is the thing that has all of the logic in it.
 
  • Like
Reactions: seq

seq

FNG / Fresh Meat
Nov 22, 2009
47
6
0
Ah great, thanks! Time to scrounge a bit more for a command that might work.