KF2 Server: Ban Players with BannedIDs (After Dec 2020)
After the December 2020 update, Tripwire disabled the WebAdmin features that some server owners used for auto-kicks, and bans by Steam ID through the console stopped working reliably. This guide, written by a server owner, shows a roundabout way to ban troublemakers by editing the server ini file. For other ways see /en/gamedb/killingfloor2/hosting/server-ip-ban-iptables-without-webadmin/.
Background
Some owners used auto-kick to enforce a play style (such as banning certain perks) that Tripwire did not intend. Instead of patching that misuse, the developers disabled the feature for everybody, and the tilde console only sometimes works with Steam IDs rather than names. Hence the workaround below.
How to ban
You only need the player's Steam ID, from your server logs (if you enabled logging) or from their profile when viewed from the Steam app in a game. The example below uses a made up number.
- Take the Steam ID shown in WebAdmin, for example
16561198233885840. - Open
https://steamidfinder.com/lookup/<SteamID>/. The page returns the SteamID3, usually[U:1:27453258880]or[U:0:27453258880]. The number you need is the one after the second colon (8 to 10 digits). The 0 or 1 after "U:" does not matter here. - Edit the dedicated server file
PCServer-KFGame.iniand find the[Engine.AccessControl]section. The author found banned lines start right afterGamePassword=. - Add:
BannedIDs=(Uid=(A=27453258880,B=17825793))
A is that 8 to 10 digit number from SteamID3. The author does not know what B means, but it has been the same (17825793) for all of the old bans on their servers.
5. Save the ini and restart the server so it reads the file.
Several bans
Add one line per ID:
BannedIDs=(Uid=(A=27453258880,B=17825793))
BannedIDs=(Uid=(A=27453258881,B=17825793))
BannedIDs=(Uid=(A=27453258882,B=17825793))
Credits
The author thanks Steam ID Finder, which as far as they knew was the only way to get the SteamID3 value, and hopes Tripwire fixes the underlying problem so that nobody needs this method.
FAQ
- Which file do I edit?
- PCServer-KFGame.ini, in the [Engine.AccessControl] section.
- What ID do I need?
- The SteamID3 number, the digits after the second colon in a value like [U:1:27453258880].
- How do I ban more than one player?
- Add one BannedIDs line per player in the same section.