Help:Dedicated servers

From Killing Floor Wiki
Jump to: navigation, search

Creating a dedicated server can be useful for LAN games or hosting a server for you and your friends if you have a good connection speed. There are two main methods of creating a dedicated server:

  1. The quick method: To create a dedicated server, go to "Host Game", and configure everything. Then, click "Dedicated" in the bottom right corner of the screen.
  2. The detailed method: Follow the guide below to learn how to have more control over the server and retain settings for future games.

Contents

[edit] Killing Floor ports

Default:

If the Game port is offset from the default 7707, then all of the other ports are offset by the same value. For example, if the Game port is changed to 7709 (+2), then the following ports are used:

This is typically only needed when running multiple servers on one system. It is recommended to leave the ports as they are by default.

In the server's KillingFloor.ini, change the following values:

[URL]
Port=7707

[IpDrv.UdpGamespyQuery]
OldQueryPortNumber=7717

[UWeb.WebServer]
ListenPort=8075

The other values should change automatically.

[edit] Installation

As of May 2012 the method to install and update the dedicated servers has changed. It now uses Steam's new byte-patching command line client instead of the older file-based HLDSUpdateTool (which is no longer maintained).

To install, you must first go to http://store.steampowered.com and create a new Steam account, which will be used to authorise your installation. You do not require any game ownership within this account, and it is used purely for updating the server files.

Once you have the account, download the SteamCMD client for Windows (download links are here) and extract it to a new, empty folder such as “C:\SteamCMD\”.

Then create a new folder for the game files, such as “C:\killingfloor\”.

Next, open a text editor (such as Notepad) and enter the following:

steamcmd +login <user> <password> +force_install_dir C:\killingfloor\ +app_update 215350 +exit

The above should all be on a single line.

If SteamGuard is enabled you will be prompted to supply an activation code sent to your email.

Be sure to:

Save the file into the same directory you extracted SteamCMD to before, and be sure to save it with a .bat extension.

Double-click the batch file and SteamCMD should pop up and update itself, and then begin downloading the files from the Steam servers. Once this is complete, the SteamCMD window will disappear, and at that point you should be able to continue configuring your server. For future updates, simply stop your game server, run the .bat file again and it should fetch any required updates for you.

[edit] Configuration

To fully configure the server, see KillingFloor.ini.

The quick options that should be changed are:

  • ServerName=
  • GamePassword=
  • GameDifficulty=

GameDifficulty sets the difficulty level for the game.


KFGameLength sets the number of many waves that the players fight through.

To enable map voting (highly recommended):

bMapVote=True
RepeatLimit=0
bUseMapList=True

This enables map voting in the server (highly recommended).

WARNING: Never change Default.ini

[edit] Launch

Within the server's System folder (C:\KFServer), there is a kf_server_launcher.bat file. Double-clicking this file will launch the server. The default command line contained within is:

ucc server KF-Bedlam.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6

This command line tells the server to launch with the KF-Bedlam map using the game type KFmod.KFGameType with the Valve Anti-Cheat (VAC) system being active and a maximum of 6 players being permitted to enter the server at any one time.

[edit] Multiple instances on one server

Additional commands can be added to the command line as follows:

In order to run multiple instances of the server on one server with several IP addresses available add the following to the end of the line:

?multihome=0.0.0.0

It will then look like:

ucc server KF-Bedlam.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?multihome=0.0.0.0

For adding new mutators to the command line, see Installing custom mutators below.

Note: Those of you hosting a server locally on your home internet connection or are just running a basic setup, it is usually not necessary to include the "?multihome=0.0.0.0" command.

[edit] Admin control

It is recommended to enable both Web Admin and Server Admin, as in some instances they support each other. The Web Admin tool has a powerful web browser interface that allows the configuration of the server from a remote location without needing to manually edit KillingFloor.ini, saving time and hassle. It is recommended that admins become familiar with this tool and use it to its full potential.

[edit] Creating admins

There are many options:

[edit] Command line

You can set a single admin in the launcher command line. This is the quickest method to set up a single admin.

You can set your admin name and password in the command line in kf_server_launcher.bat by appending the following code:

?AdminName=XXXXX?AdminPassword=XXXXX

The entire line command will look something like this:

ucc server KF-BioticsLab.rom?game=KFmod.KFGameType?VACSecured=true?MaxPlayers=6?AdminName=xxxx?AdminPassword=xxxxx

[edit] Multiple admins

You can set up multiple admins from KillingFloor.ini. It is recommended to do this if you are setting up a clan server and wish to assign certain privileges to certain players.

You need to find the following section in KillingFloor.ini and change it so it reads as follows:

[Engine.GameInfo]
AccessControlClass=xAdmin.AccessControlIni

This will then create a file called xAdmin.ini in the System directory when you start your server. You can add admins by editing that or by using the Web Admin Interface. IMPORTANT!!! After you made this change your login settings for the Web Admin Interface are changed default to User:Admin and Password:Admin!!! Change it after your login was successfully.

[edit] Accessing the Web Admin Interface

To access your Web Admin Interface go to:

http://YOUR_SERVER_IP:8075

It is also possible to access the Web Admin Interface utilising the web browsing function found within the Steam application. See the following for details: http://forums.tripwireinteractive.com/showthread.php?t=31715

[edit] In-game admin login

[edit] Single admin

When in-game, press the ~ key (or ' key) to open the console and type:

adminlogin <adminpassword>

This will register you as the server admin. More than one admin can use the same password. At present, admins are required to log in after every map change.

[edit] Multiple admins

When in-game, press the ~ key (or ' key) to open the console and type:

adminlogin <username> <password>

This will register you as the server admin. Each admin should have their own password. At present, admins are required to log in after every map change.

[edit] Binding an admin login key

[edit] Method 1

When in-game, press the ~ key (or ' key) to open the console and type:

preferences

This will bring up a box that provides access to many of the more advanced game settings. Through this, you can bind a key to perform a command.

[edit] Method 2

Open the console and add, for example using the M key:

SET INPUT m adminlogin <adminpassword>

or

SET INPUT m adminlogin <username> <password>

This adds the following entry to the killingfloor\System\User.ini file:

M=adminlogin <password>
[edit] Method 3

Alternatively, the admin commands can be added to the User.ini file directly.

For example:

N=adminlogin <username> <password>

Binds from that file can conveniently be edited or removed manually.

[edit] Force map change

Once logged in, there are two ways to force a map change:

  1. Go to Map Vote and make your selection. As Admin you will force the change.
  2. Open the command console and type:
    admin map <map name>

It is not necessary to type .rom after the map name.

[edit] Admins kick/ban function

If you have enabled the Vote Kick option in your Web Admin Interface or KillingFloor.ini file, then as Admin you can use the in-game Vote Kick function to immediately kick players. Simply right-click on a player's name, and you'll be given an extended Kick/Ban option for Admin. Players logged in as Server Admin will be immune to Vote Kick.

[edit] Other Admin Commands

ADMIN SAY MESSAGE

An admin can make a message appear in the middle of the screen using the following command:

admin adminsay <message>
ADMIN SET

An admin can make some sophisticated changes to a server by changing by the property on the package.class to a new value. For example:

Set the difficulty to Beginner:

admin set engine.gameinfo gamedifficulty 1

Set the difficulty to Normal:

admin set engine.gameinfo gamedifficulty 2

This command can change multiple settings and will be in the format:

admin set <package>.<classname> <property> <value>

Note the spaces where applicable.

PAUSE

An admin can pause the game using a console command.

First, the pause function must be enabled on the server. This can be done in the Web Admin Interface or by adding the following line to the KillingFloor.ini file under [Engine.GameInfo]:

bAdminCanPause=True

After logging in as an admin, type pause in the console to pause the game. To unpause, type the command again or shoot your weapon.

[edit] Installing custom maps using a redirect

Using the Killing Floor SDK, the community can create custom maps for admins to host on their servers. These maps can be automatically downloaded by users joining your server with a few easy steps as follows:

1) Download a custom map and place it in the maps folder.

2) Go to your system folder and create a .bat file with the following code:

ucc compress ..\maps\<mapname>.rom

This will compress the map into into a much smaller size and display .uz2 at the end of the map name. KF-WestLondonNight.rom was compressed from 10.7 MB to 1.78 MB. This will reduce download time and keep bandwidth to a fraction of what it would have been without compression.

If you want to compress every single map in the map folder then here is a script from saweet. Even though it will compress the default maps as well, this can still be an efficient script if you have multiple custom maps to compress in one instance.

Create a .bat file containing the following command in your system folder. ie: compress_maps.bat

Code:

for /f "tokens=*" %%a in ("C:\killingfloorServer\maps\*.rom") do ucc compress %%a

3) Go to your map folder and you'll see the compressed map as <mapname.rom.uz2>.

4) Remove this compressed map from your map folder and upload it to your third party host. I made a folder in the main web host directory called maps and placed the compressed map in there. http://www.yourhost.com/maps/

5) Go to your KillingFloor.ini and locate [IpDrv.HTTPDownload] In the RedirectToURL= place the location of the compressed map: RedirectToURL=http://www.yourhost.com/maps/

Note the forward slash at the end of the redirect link.

By default you will see UseCompression=True is already set.

6) Now you need to add the map to the map list. You can do this manually or through the Web Admin Interface.

I recommend using the Web Admin Interface for your first attempt as it will write a [KFMod.KFMaplist] entry at the bottom of your KillingFloor.ini with maps listed below as follows:

[KFMod.KFMaplist]
MapNum=0
Maps=KF-<map name>
Maps=KF-<map name>
Maps=KF-<map name>

Go to your Web Admin interface and select Defaults > Maps. Select maps you want added to the map cycle and move them from Maps Not In Cycle > Maps In Cycle using the arrow tabs. Hit the Save button.

7) Restart the map or server, and perform a Map Vote for the new map.

Once you have your [KFMod.KFMaplist] entry listed at the bottom of the KillingFloor.ini you can simply update map entries there for new custom maps or continue to use the Web Admin Interface.

If you do not have a host who can store your maps, you can test the function using a free file hosting site.

You can also configure the redirect from your own server PC by installing your own web hosting application, like Apache.

[edit] Installing custom mutators

A mutator adds additional dynamics to KF beyond those experienced in regular gameplay. In addition to the mutators that come bundled with the game, there are numerous community made mutators that allow users to expand the way their servers operate. Some custom mutators make subtle changes to gameplay that won't impact your ability to increase your achievements or perks. These mutators can be added to a whitelist and will not disable achievements or perks. Custom mutators that allow you to manipulate elements of the game that give you achievements or perks at an accelerated rate will not be whitelisted and their use on a server will disable achievements and perks. Server Admin can decide on the settings they prefer.

For example, the KF Anti-Blocker mutator disables player collisions during 'Trader' time so that players are able to pass through each other. Without this mutator, a player can stand in front of a trader door and block entry for the others. This mutator will allow you to pass through each other.

  1. Download the KF Anti-Blocker mutator
  2. Move the files MutKFAntiBlocker.ucl and MutKFAntiBlocker.u to your system folder. In my case this is located at C:\KS1\system.
  3. Stop your server and either set the mutator to be activated automatically using the command line in your kf_server_launcher.bat by adding:
?Mutator=MutKFAntiBlocker.MutKFAntiBlocker

or after restarting the server with the mutator files added go to your Web Admin Interface > Mutators and check 'AntiBlocker' > 'Set Selected Mutators' and then Restart Map.

The Web Admin Interface automatically recognises the mutator after adding the .ucl and .u files to the system folder.

If this applies to all mutators you'll have to wait and see. In case a mutator is not recognised it has been suggested you can add it to the KillingFloor.ini manually under the [Engine.GameEngine] area as follows:

ServerPackages=MutKFAntiBlocker
Globeicon.png Language: English
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox