Killing Floor 2

Killing Floor 2

52 ratings
Auto-Kick level or perk with Violentmonkey
By BEROCHlU
For KF2 Server WebAdmin script
IMPORTANT
Only work with perk kick. Because all player's Level are shown as 25.
   
Award
Favorite
Favorited
Unfavorite
Feature
  • You will be able to auto-kick level or perk without mutator as Ranked Server.
  • I'm not original creator, but I fixed a issue and improved, add a perk-kick feature.
Original script is here[forums.tripwireinteractive.com]. (not available)
Install
  1. Install Google Chrome.
  2. Install browser addon Violentmonkey[chrome.google.com]
  3. Download latest release zip file.[github.com]
  4. Import the zip file from Violentmonkey setting.
  5. Extract the zip file.
  6. Backup and OverWrite 3 files:
  • console.html
  • current_players.html
  • current_players_row.inc
location: \<KF2Server\>\KFGame\Web\ServerAdmin
Run
  1. Launch KF2 Server.bat
  2. Open brower Chrome or FireFox.
  3. Move to WebAdmin. (default: http://localhost:8080)
Settings
Click MANAGEMENT CONSOLE in WebAdmin.

  • ALLOW MINIMUM PERK LEVEL
    A player below this level will be kicked.

  • ALLOW MAXIMUM PERK LEVEL
    A player above this level will be kicked.

  • KICK PERK
    Checked perks will be kicked.

  • ALLOW ALL PERKS FROM LAST WAVE UNTIL THE BOSS WAVE
    If checked Enable, all perks are allowed between last wave and boss wave. (default: unchecked)
    But keep level-kick. When players reach last wave, following message will be announced:
    Allowed All Perks from last wave until the Boss wave.

These settings will take effect in a few seconds after being changed.
Confirm working
It dose works if you see a number 1 with Violentmonkey icon.



Keep open browser to work auto-kick script. If you close the browser, the script will not work.
Q&A
All players name are shown as anonymous in PLAYERS page

It is not a bug but a feature. All players name are shown as anonymous because to avoid a bug which would not work by GO button. This is not my script bug. This is a known bug caused by the KF2 server not assuming player name whose multibyte-characters. That is why this is not my script bug.
Does it run with Tampermonkey too?
Yes, if your server under heavy load, Tampermonkey could be better.
Can I do individual auto-kick setting for multiple server?
Yes, the setting is independent per url and is stored individually.
What is a fixed issue and improved
I had fixed issues are following:
  • Previous auto-kick script could't kick specific player whose name is multibyte-character. (e.g. Japanese, Chinese, Korea)
  • No need to keep open AUTO-KICK page to enable auto-kick script. This script is valid each page in WebAdmin.
31 Comments
Rudera Dec 10, 2024 @ 1:51pm 
is this working?
BEROCHlU  [author] Mar 24, 2021 @ 7:58am 
Only work with perk kick. Because all players Level are shown as 25.
BEROCHlU  [author] Feb 4, 2021 @ 7:07pm 
He seems to like Japanese anime Fate/Zero, but Japanese people dislike him. I am also one of the Japanese people who hate him.
BEROCHlU  [author] Feb 4, 2021 @ 7:01pm 
KoLbI is spam user. Don't touch him. He can't understand browser userscript because his intelligence is very low. The appear of spam user like KoLbI means the end of KF2.
BEROCHlU  [author] Feb 4, 2021 @ 9:51am 
Can't you make it KoLbi ? Yes, you know. All you can do is send spam. You'll not understand my script.
KoLbI Feb 3, 2021 @ 11:20am 
"Keep open browser to work auto-kick script. If you close the browser, the script will not work." Are you kidding me xD
BEROCHlU  [author] Nov 15, 2020 @ 3:21am 
November in 2020, a bug has been occurring that all player level are shown as 25. This is not my script bug but KF2 server bug.:sr4paul:
FantomDestroyer Jun 30, 2020 @ 12:04pm 
@dskina, I've found that it works best if the browser that has the installed script running is open.

You can use another webadmin on a different broswer though like in the steam overlay web browser and the kicking will still work because the main web admin is still running with the monkey
dskina Jun 30, 2020 @ 11:44am 
Does webadmin need to be open for auto-kick to work?
BEROCHlU  [author] Jun 28, 2020 @ 6:42am 
The auto-kick script does not determine if the user is an admin. By default, it can take up to 16 seconds for a user to be kicked, so I guess that the logout and kick timings just had overlapped.

"timer_count" is number of times the kickTime function has been called. This is a variable to improve memory leak. It doesn't affected auto-kick.

"kickTime" unit is milliseconds. You know, auto-kick script runs every 16000 milliseconds (16 seconds) by default. So you have to wait up to 16 seconds before the target is kicked.
If your server has more than 8GB of memory, then between 1000 and 8000 may be better.