Killing Floor 2

Killing Floor 2

Not enough ratings
How to setup a KF2 Server with custom maps and mods
By Glitchybun
Here's a small Guide on how to set up and play on a KF2 Server with custom / workshop maps.

I suggest reading the whole guide before you start to set it up yourself to gather all the information and avoid unnecessary steps.
   
Award
Favorite
Favorited
Unfavorite
Server Setup
STEP 1 -- Download SteamCMD

http://media.steampowered.com/installer/steamcmd.zip


STEP 2 -- Start SteamCMD
.
Execute steamcmd.exe
When you start it for the first time, it will automatically install all the needed files (For SteamCMD not KF2!) in the folder it is in, so make sure you put it where you want it before starting it.


STEP 3 -- Select installation directory (optional)
.
If you don't want the KF2-Server directory to be in the SteamCMD Folder, type:
force_install_dir \Path\to\Server\
Example: force_install_dir C:\Servers\KF2Server\

After sending the command, it doesn't tell you that something happened. If the Path doesn't exist, it will simply create a folder when downloading the files into it. So make sure to spell the path right!


STEP 4 -- Login
.
SteamCMD wants you to login, you can do so by typing:
login anonymous
This will log in to SteamCMD anonymously


STEP 5 -- Download / Update Server files
-
To download the current version of the game, use:
app_update 232130

If you already downloaded the game and only want to update it, use:
app_update 232130 validate

If you want to update the game version to a beta branch, use:
app_update 232130 -beta preview

Server files ~32 GB


STEP 6 -- Start the Server
-
Go to the KF2-Server directory and execute KF2Server.bat

When everything is working, it should display something like this:

KF2 Version XXXXX
Initializing game engine completed.
STEAM GAME SERVER UID XXXXXXXXX


This indicates that the server is working and communicating with the Steam servers.
Port Forwarding
Every router and modem does this part a little differently, with different menus and such.
You need to look up how to do Port Forwarding on your own router or modem.

Ports
.
These ports give devices outside your own network the ability to connect to your Server.
So if you wanna play with friends that are not in your Network or random people online, you have to enable these ports.
You yourself can play on the server (given you are in the same network as the server) without forwarding these ports.

Port
Type
Used for
7777
UDP
Game
27015
UDP
Query
20560
UDP
Steam
8080
TCP
WebAdmin (Optional)
123
UDP
NTP (Weekly Outbreak Only)

You can change these ports in the config files.
Configuration
Startup File
.
The KF2Server.bat file looks like this by default:
start .\Binaries\win64\kfserver kf-bioticslab?adminpassword=123

The first part should remain the same at all times, the rest you can change to your preference.

The "kf-bioticslab" can be interchanged with any map. This changes the map that loads when you first start the server.

Here's a full list of arguments you can use after the Map name:

Arguments
Valid Entries
What this option controls
AdminName=
Alpha numeric character combinations. Example: Admin
This is the admin username for WebAdmin if you're configuring WebAdmin via Commandline
AdminPassword=
Alpha numeric character combinations. Example: Abd32Sdn53
This is the master server administrator password
MaxPlayers=
Alpha numeric character combinations. Example: 6
This is how many maximum players the server is set to support
Difficulty=
Numeric characters 0-3
This sets the server difficulty. 0 = Normal, 1 = Hard, 2 = Suicidal, 3 = Hell on Earth

When using multiple arguments, separate them with a "?".
This indicates that a new command is following.
For example: "... kf-bioticslab?adminpassword=123?MaxPlayers=2?Difficulty=3"

IMPORTANT: Arguments in the Startup file take priority over what is set in the config files but can still be changed while the server is running with the WebAdmin.


Config Files

In the config file .\KFGame\Config\PCServer-KFGame.ini you can change the "AdminPassword", the "GamePassword", the "ServerName" and much more!


In the config file .\KFGame\Config\PCServer-KFEngine.ini you SHOULD change a specific value (if it's not changed already).

The Line bUsedForTakeover= should be False !

This prevents the server from allowing someone else taking over the server when it's idle for too long.


WebAdmin
.
You have to enable the WebAdmin if you plan on using it.

Open the file .\KFGame\Config\KFWeb.ini and change the line "bEnabled=" from false to true.
In there you can also change the port of the WebAdmin, if you wish to do so.

To access the WebAdmin you have to find out what IPv4 address the computer (that is running the server) has.
Open the Windows Command Prompt and type in "ipconfig"
Then just read the line that says IPv4
In my case, the IPv4 is: 192.168.178.33


.
When the server is running, type <YOUR IPv4>:8080 into the adressbar of your browser and you will land on the login page of the WebAdmin interface

You can then log in with the Username "Admin" and the Password you set earlier.


In Chrome, I had the problem before that it wouldn't let me sign in at all.
If you also get the error "Invalid form data." after making sure that everything is correct and should actually work, go to .\KFGame\Config\KFWebAdmin.ini and change "bHttpAuth=" from false to true and try again.
Custom Maps and Mods - Option 2 - KF2ServerTool
STEP 1 -- Download KF2ServerTool

https://github.com/darkdks/KF2ServerTool/releases


STEP 2 -- Install KF2ServerTool

Move the contents of the .zip to the main directory of your server.


STEP 3 -- Start KF2ServerTool

Execute the KF2ServerTool.exe inside the Server folder.


STEP 4 -- Adjust options
.
Go to the Options tab and enable “Workshop Download Manager” and “Custom redirect” and add the Redirect URL http://kf2.tripwirecdn.com/”.
This made custom maps work for me.


STEP 5 -- Add Maps / Mods
.
Go to the Maps / Mods tab.

Here you have several options how you can add a Map / Mod:
  • From a file
  • From a backup
  • From the provided redirect
  • By entering a Workshop ID or URL
  • By opening the inbuilt Workshop browser

Most mods require to be added in the “Additional parameters” for them to work.
The mod page should state what you need to add.

STEP 6 -- Verify Map install
.
When you add Maps with this tool, you need to make sure that the Map has green checkmarks in the columns “Map Entry” and “Cycle Entry”.

If those entries have red crosses, you can right-click the item and choose reinstall.
Check all the boxes in the process and hit OK.
After a bit of loading, it should tell you that it's finished.


STEP 7 -- Start the Server with KF2ServerTool

Go to the server tab, choose a map and your preferred settings, and start the Server!

Custom Maps and Mods - Option 2 - Manual configuration
STEP 1 -- Find Maps or Mods

Browse the Workshop and find a Map or Mod that you would like to add.


STEP 2 -- Get Workshop ID

You can get the Workshop ID of the Map or Mod by checking the URL

Example URL: https://steamproxy.net/sharedfiles/filedetails/?id=643383080&searchtext=
The Workshop ID would be: 643383080


STEP 3 -- Open Config

Make sure the server is NOT running.
Go to the config file .\KFGame\Config\PCServer-KFEngine.ini and open it with Notepad or Notepad++ for easier visualization.


STEP 4 -- Add Workshop content to
.
Insert this into the file if it's not there already:
[IpDrv.HTTPDownload] RedirectToURL=http://kf2.tripwirecdn.com/ [OnlineSubsystemSteamworks.KFWorkshopSteamworks] ServerSubscribedWorkshopItems=
This is where you insert the Workshop IDs you got earlier.


STEP 5 -- Add Map to Index
.
Now that the Workshop IDs are added, we need to make sure the server sees these new maps.

For that to happen we need to edit the config file .\KFGame\Config\PCServer-KFGame.ini with either Notepad or Notepad++ for, again, easier visualization.

Go to the very bottom of the file and add this:
[KF-MAPNAME KFMapSummary] MapName=KF-MAPNAME MapAssociation=0 ScreenshotPathName=UI_MapPreview_TEX.UI_MapPreview_Placeholder

Obviously ”MAPNAME” needs to be replaced with the name of the map you want to add.
Example:
[KF-BikiniAtoll KFMapSummary] MapName=KF-BikiniAtoll MapAssociation=0 ScreenshotPathName=UI_MapPreview_TEX.UI_MapPreview_Placeholder


STEP 6 -- Add Map to the Cycle

To make the Map selectable in-game it needs to be in the “GameMapCycle” and there are two ways to do add it.

Option 1 - Config File
.
  1. In the same config file (PCServer-KFGame.ini), press CTRL+F to open the search function and look for ”GameMapCycles”
    The default Maps should be in there already.

  2. Add the name of the workshop map here.

  3. If you want to only play custom Maps and want to remove the default maps from the rotation, you can delete them here.

Option 2 - WebAdmin
.
  1. Start the Server

  2. In the WebAdmin navigate to ”Map Cycles” under the category ”Settings”

  3. There are multiple ways for you to add and remove maps from the Cycle here.
    • Drag and drop the maps to your liking
    • ”Add Missing” which will add all available maps that are not already in the cycle
    • ”Manual Add” lets you type in the map name by hand
    • ”Basic edit mode”

  4. Hit “Save Map Cycle” before you leave the menu, or else all of your hard work is for naught

STEP 7 -- Add Mod to Starting Arguments
.
Edit the Startup file and add "Mutator" that the mod needs. You will most likely find it on the Modpage in the Workshop
And that should be all!
You should now have a KF2 Server running locally that's listed in the KF2 Server Browser with Custom maps and mods!

This guide is heavily inspired by this Post
I have used it multiple times to set up my servers over the years and thought that it could use a little refresher 9 years later.

I hope this guide helped you set up your own Killing Floor 2 server with custom maps and mods! :3
.
.
.
.
.
1 Comments
Wehzy 28 Jul @ 6:08am 
Saving this for later.

Thanks.