Killing Floor 2

Killing Floor 2

1,199 ratings
Useful console commands for testing
By Ben
This is just a short list of some useful console commands I figured out so far by looking through the auto completion thing of the kf2 console.
4
   
Award
Favorite
Favorited
Unfavorite
General commands for testing
To create some kind of safe testing environment, just spawn a braindead clot (SpawnZED Clot) after enabling the cheats and kill off the rest of the wave; then you'll have all the time you want to play around without having to worry about the next waves coming up.

EnableCheats Enable Cheats, including all the commands below God Godmode Demigod You'll take damage but survive with 1hp HealMe [INT] Gives an amount of Health ArmorMe [INT] Gives an amount of Armor SpawnHumanPawn 0 1 Adds a braindead player ChangeSize 0-5 Scale the player's size to be x default size KillBots Removes all of those braindead players KIllzeds Kill all zeds KillViewedActor Use it to kill the bot Viewed Imrich Loadsamoney doshMe x Give x amount of dosh fly R. Kelly mode ghost Noclip on walk Noclip off WinMatch gg allammo Refill ammo allweapons Gives you some of the weapons melee Gives you "all" melee weapons OpenTrader Allows trading OpenTraderNext Closes the current trader and opens the next one OpenTraderMenu Opens the Trader SpawnZEDLods Clot Spawn a bunch of clots SpawnZED Clot Spawn a single clot SpawnAI Clot Spawn a zed which isn't braindead SpawnZedGroup x y z x = Zed name, y = How many rows, z = How many in each row. slomo x Game speed, try .2 / .3 playersonly Freeze everything except players Berserk Gives you Berserker weapons Medic Gives you Medic weapons Assault Gives you Commando weapons Shotty Gives you Support weapons Firebug Gives you Firebug weapons Demo Gives you Demo weapons Nails Gives you the VLAD-1000 Nailgun. Dualies Gives you Gunslinger weapons Uberammo Unlimited ammo (no reload) and grenades NoSpread/GoSpread Disables/Enables weapon spread NoRecoil/GoRecoil Disables/Enables weapon recoil WeapFOV x Weapon FOV, have to be changed for each individual weapon NextTrack Plays the next song SetGravity x Sets the gravity SetJumpZ x Sets how high the player jumps SetSpeed x Sets the player walk speed ClearCorpses Does what it says ClearSplatters Does what it says ResetDoors Resets all doors on the map ToggleZedsIgnoreMe Zeds with AI will ignore the player and possibly die from inactivity ToggleHUD, ShowHUD Shows/hides the hud ToggleScreenShotMode Removes HUD and arms. Arms will be permanently disabled ShowHands 1 Re-enable arms them ChangeSize 0-5 Scale the player's size to be x default size Show Paths show apple paths of the zeds -UnCheats Summon Summon string ClassName (like Summon kfchar.zombieclot) Teleport Allows You to teleport to the surface at your crosshair ViewPlayer name View From Players ViewSelf View From Own Camera ViewZed View From Random Zombies WinMatch gg SpawnDebugAI Works like SpawnZed, but spawns a Zed with controllable AI AI Type this in and some AI commands will appear above, scroll to find more (if using F3 console). These commands will only work with a Debug AI character. Autofire 1 Automaticly shoots your weapon once every second AIHuskFlamethrower Flamethrower attack of a husk spawned via SpawnDebugAI or SpawnAI AIHeadlessWander Basically decapitates the zed and makes it wander headless BackgroundBlur 1 Blurs everything except for the HUD Camerapuke Simulates your vison after getting puked on by a bloat ce benchmark Starts a benchmark which basically gives you a camera tour through the map FakeDramaEvent Trigger Zed Time Fov 100 Change FOV to 100 HansGunsOut Forces Hans to pull his guns out HansGunsAway Forces Hans to stop using his guns HansNextPhase Trigger Hans healing phase HansGas Trigger Hans Gas attack nvenablezedtime 0 Disable Zed time nvheadshot No matter where you shoot a Zed, it always counts as headshot nvzedtime 1 1 15 Triggers 15 seconds of Zedtime Noammo Takes away all your ammo Pause Pauses the game Playknockdown Zed plays the knockdown animation Playstunned Zed plays the stunned animation Playrandomsumble Zed plays stumble animation setspeed 2 Run twice as fast setjumpz 1000 Jump higher setsensitivity 5 Set mouse sensitivty to 5 setzoomedsensitivity Set iron sights sensitivtiy stat fps Show fps suicide RIP show hitzones Show hitboxes (only works offline) Along with it use displayall or getall kfpawn_zed(zedname) hitzones to get each individual hp of the hitzones, useful to get head hp.It's recommended to use getall otherwise your screen will be cluttered.

Spawning zeds is is pretty self explaintory, except for clots:
Clotu -> Cyst
Clots -> Slasher
Clota -> Regular Clot

Also, not a command but still helpful:
Pressing P after enabling cheats freezes the ZEDs

If you have anything to add just let me know. There is a quite a lot more commands which I can't really get to work just yet (like setting the perk level). They might be either broken or I'm just too stupid to use them.

You might also want to check out Hellsings Guide on how to do some photography inside of Killing Floor 2, using some of the console commands available. Pretty creative stuff!

Big shout-out to the following people for providing some more stuff:
Admin commands
These commands only work if you're logged in as admin.

It seems like these aren't working (anymore?). If you've found out any working ones, please let me know.

adminlogin password Log in with as admin adminlogout Logout admin Switch KF-mapname Change current map admin map KF-mapname Change current map You have to use the admin login password first Then enablecheats And for every commands use the prefix "admin" God DemiGod Changesize 0-5 DoshMe X Flame Fly Ghost God Imrich Uberammo Setgravity x SetJump x Shotty Slomo x
admin adminsay message Display a message in the middle of the screen
admin RestartMap Restart map
admin NextMap Go to NextMap.
admin PlayerList Write a list of all players to KillingFloor.log
admin KickBan Ban a player
admin Kick Kick a player
251 Comments
Coco 26 Oct, 2023 @ 2:55am 
Also, once the command is written, you shouldn't have to writte in again, even after restarting the game. Unless updates delete that sometimes
Coco 26 Oct, 2023 @ 2:55am 
@Chicken Rice You can set a specific action into a specific key with the key binding command
Ex: If you writte in the console "setbind Key P SpawnZed Fleshpound", you'll be able to spawn a Fleshpound when pressing "P" (so without using the console again), but remember that you'll need to "enablecheats" before writting the command and at each game you'll want to press P. If cheats isn't enable the Fleshpound won't spawn
-Enabling cheats doesn't let you gain XP
-Maybe I wrotte the code wrong, with some space missing, maybe, but I'm too lazy to reinstall the game just to test that, I'm sure you'll find this command online
-The command works with other actions. Ex: "setbind key M Say Scrake on me!" the "say" command isn't dictated by cheats, meaning you can press M in that example and it will say "Scrake on me!" no matter if you've have enabled cheats or not, are in solo or multiplayer. Pretty usefull
"Setbind key K HealMe"
"Setbind key I All Ammo"
etc...
Chicken Rice 26 Oct, 2023 @ 1:16am 
Is there a way to spawn in zeds without using console commands?

Im hoping to bind some macros to spawn zeds in during active gameplay. The problem with console commands is that opening the console window stops player actions (like moving and shooting), not to mention it blocks the entire screen ):
frosty* 21 Oct, 2022 @ 4:53pm 
@christina i know its old thread, but i finally got it working,go into map in sdk,open console,enablecheats,then type ToggleSplatterGun then with your left mouse or attack button piont to the ground first hold it then it will spray blood splatts wereu point:)but before u do that just make sure u have already built bloodsplatts or it will not work,also u have to extit the sdk to turn them off,i dont know any other way to do that:)
Augustus 18 May, 2022 @ 4:06pm 
Anyone know one would remove first person viewmodels but keep HUD in-tact?
I've been able to get it to work by spamming the "togglescreenshotmode" command whilst pausing/switching weapons.
Christina 11 Dec, 2020 @ 4:15am 
While test-playing within KF2 SDK, I'm trying to spawn a clot to see how my splatter maps look. But the command isn't recognized, even when I use the enablecheats command first. Does anyone know of a command that would work?
Glichy 29 Sep, 2020 @ 9:26pm 
Seems to be RequestSkipTrader, and 0 is already bound to it (not numpad).
Quacker 22 Sep, 2020 @ 1:19am 
Guys, can you please tell me the command that I can keybind to skip trader, without pressing esc and then the button on ui? I used it previously, but after reinstalling the game its unbinded and i forgot the command, and can't find it
Mr. Maniac 7 Aug, 2020 @ 2:03pm 
Is there a command that can force your character to drop a specific item? I accidentally spawned 15 healing syringes and now I can't even equip the 4th slot let alone heal myself.
please send help i'm at 1 hp and my only lifeline is the shredded body armor i have left
Phobsorber 9 May, 2020 @ 9:52am 
How to put your character in inactivity mode so that he moves by himself? As in the menu of choosing clothes, items.