-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Magicked provides in-game commands for tracking and ranking player stats, administration and various other quality of life improvements for dedicated Killing Floor 2 Servers. Utilizing Killing Floor 2's built in web admin Magicked maintains the distinct ability of not affecting a server's ranked or custom status. It can be ran either directly on the machine where your server is hosted, or remotely, and manage any number of servers at once. It is interfaced via an in-game chatbot or through the chat console of the web admin.
This is not currently an exhaustive list of available features but a curt overview.
- Enable and Disable a password quickly from in-game.
- Greet players upon entering the game.
- Quickly load a different map by using the !load_map mapname command.
- Change game difficulty and length.
- Restart the current map.
- Automatically issue commands based on: time, wave, or trader state
- Record player statistics including: kills, dosh, deaths and play time allowing you to show:
- A summary of your own stats as well as other players stats.
- The total amount of kills and dosh earned on a server.
- After wave reports showing the player with the most dosh or kills from the previous wave.
Create banner or maybe take full screencaps and size with github
- Auto Updating Map Cycle: This will be a section for the Map Cycle that contains the 20 or so most popular maps played on the server, or 20 most popular maps according to the Steam Workshop Map Ratings.
- Steam ID's instead of Steam Names: Plan for Player Stats to be saved to Steam ID's instead of Steam Names, which will mean when a player changes their Steam Name their stats will follow.
- Ticket System: We plan to have a Ticket system. If someone takes your weapon and sells it, or if there are players who kick everyone who try to join, you will be able to make a ticket, that an Admin can read when he gets online.
- Delay Timed Commands in .init files: The ability to start two "!start_tc 60 say Test" commands at once but 30 seconds apart. This will be done with "!start_tc 30 60 say Test where 30 is the amount for the command start to be delayed.
- !top_time: Ability to see top 5 players by time played.
- Player Rank Up Messages: When a player ranks up, there will be a message congratulating the player.
Magicked was originally created by th3_Z.
Original documentation created by Stephen.
It is currently being maintained by:
- th3_Z
- Jabel
- Stephen
- _N0x
Magicked admin does not require any modification to your server to operate properly, however, to utilize all of the features included some modifications may be required. If you are not interested in making any modifications to your web admin you can continue to the basic setup section.
- Enable weekly and endless mode.
- Add perk level to web admin.
- Python 3.4+
- cx_freeze
- requests
- lxml
- colorama
- termcolor
Build by running the provided scripts build.bat
or build.sh
after installing dependencies via pip.
Note: It is suggested that you download a stable release from the releases page. If you would like to help test Magicked feel free to download source from the master branch.
- Download a current build from the releases page.
- Extract the downloaded folder.
- Ensure that you have read the prerequisite section.
- Open
magicked_admin.conf
- Edit these lines to match your server details:
address = 127.0.0.1:8080
username = Admin
password = 123
Example:
address = 192.168.1.42:8080
username = Magicked
password = SuperSecretPassword
- Run python main.py if executing from source. If you're using a binary execute magicked_admin.exe.
- Consider reading the Advanced Setup guide for further configuration options.
If you are running Magicked on the same machine as your server is running on you can keep address
as 127.0.0.1
and just change the port number to the web-admin port number. If you run your server on another machine you will need to change address
from 127.0.0.1
to the public IP of the machine your server is hosted on in addition to the port number. This would be the IP that you would connect to in game plus the web-admin port number. The next options, username
and password
should be set to the username and password of the web-admin account you want Magicked to communicate through.
Note: If you are executing or building from source you will need to ensure that the example configs are copied from the config folder to the root folder, the build scripts should do this automatically.
In order to fully utlize all the features of Magicked it is suggested that you follow this list to setup Magicked:
- Enable Weekly and Endless Mode.
- Configure Multi-Admin for use with Magicked.
- Configure
magicked_admin.conf
fully. - Configure your Welcome Screen
- Configure your MOTD init's
- Check out the Advanced section!
Note: You can leave your server(s) open while you make these edits and should not require a restart.
- On the machine that you are hosting your server on navigate to
.\kf2server\KFGame\Web\ServerAdmin
- You should see a file named
current_rules.inc
open that file, you should see something that looks like:
<dt>Players</dt>
<dd><%rules.numplayers%>/<%rules.maxplayers%></dd>
<dt>Difficulty</dt>
<dd><%rules.difficulty.text%></dd>
<dt>Minimum to Start</dt>
<dd><%rules.minnetplayers%></dd>
<dt>Spectators</dt>
<dd><%rules.numspectators%>/<%rules.maxspectators%></dd>
<dt>Player Map Voting</dt>
<dd><%rules.mapvote%></dd>
<dt>Player Kick voting</dt>
<dd><%rules.kickvote%></dd>
- Select and delete all the code in
current_rules.inc
and paste the code below into the file:
<dt>Wave</dt>
<dd><%wave.num%>/<%wave.max%></dd>
<dt>Difficulty</dt>
<dd><%rules.difficulty.text%></dd>
<dt>Players</dt>
<dd><%rules.numplayers%>/<%rules.maxplayers%></dd>
<dt>Minimum to Start</dt>
<dd><%rules.minnetplayers%></dd>
<dt>Spectators</dt>
<dd><%rules.numspectators%>/<%rules.maxspectators%></dd>
<dt>Player Map Voting</dt>
<dd><%rules.mapvote%></dd>
<dt>Player Kick voting</dt>
<dd><%rules.kickvote%></dd>
- Save, exit, and refresh your web-admin to check that the changes are working properly. It should look something like:
- Next, in the same directory, open
gamesummary.inc
you should see something that looks like:
<div class="gs_mapimage"><img src="<%map.image%>" alt="<%map.name%>"/></div>
<dl class="gs_details">
<dt class="gs_map">Map</dt>
<dd class="gs_map"><%map.title.safe%></dd>
<dt class="gs_players">Players</dt>
<dd class="gs_players"><%rules.numplayers%>/<%rules.maxplayers%></dd>
<dt class="gs_time">Time</dt>
<dd class="gs_time"><%time.elapsed%>/<%time.timelimit%></dd>
</dl>
- Select and delete all the code in
gamesummary.inc
and paste the code below into the file:
<div class="gs_mapimage"><img src="<%map.image%>" alt="<%map.name%>"/></div>
<dl class="gs_details">
<dt class="gs_map">Map</dt>
<dd class="gs_map"><%map.title.safe%></dd>
<dt class="gs_players">Players</dt>
<dd class="gs_players"><%rules.numplayers%>/<%rules.maxplayers%></dd>
<dt class="gs_wave">Wave <%wave.num%>/<%wave.max%></dt>
<dd class="gs_wave"><%wave.monsters.dead%>/<%wave.monsters.total%></dd>
</dl>
- Save, exit, and refresh your web-admin to check that the changes are working properly. It should look something like:
Endless
Weekly
- Launch Magicked, it will now be able work with Endless and Weekly mode.
Note: In Endless mode when you have players in your server, webadmin will show for example "Wave 30/31" or "Wave 30/30", however, when the server doesn't have any players it will show "Wave 0/254".
- Navigate to
.\KFGame\Web\ServerAdmin
- Open the
current.html
then search for Players or scroll down and you should see the headers Name, Perk, Dosh, Health, Kills, and Ping. - Add
<th>Level</th>
and place it under the Perk line. It should looks something like: - Next open
current_players.html
Right away you should see the headers titled Player name, Ping, IP, Steam ID, etc. similar to before. - Add
<th>Perk</th>
and<th>Level</th>
and place them under the Player name line. It should look something like: - Now open
current_player_row.inc
and add the<td class="right"><%player.perk.level%></td>
under%player.perk.name%
It should look something like: - Finally open
current_players_row.inc
and add<td><%player.perk.name%></td>
and<td class="center"><%player.perk.level%></td>
under%player.name%
. Be sure to also change%player.ping%
class fromright
tocenter
. When you are finished it should look something like: - You should be all finished, close and save all your files and reload the web-admin to ensure perk level is displaying correctly.
If you haven't spent much time configuring your server you are very likely using the default web-admin credentials which looks something like this:
If you would like to use a specific user name like the image below with Magicked you will need to configure multi-admin.
Note: If you're a pro and don't need a walk-through just read the Tripwire wiki here otherwise keep on reading.
- Navigate to your servers config folder,
kf2server\KFGame\Config\
- Open
KFWebAdmin.ini
in Notepad and addAuthenticationClass=WebAdmin.MultiWebAdminAuth
under the[WebAdmin.WebAdmin]
section and save the edit. - Now open your web-admin and there should be a new administrators section under web-admin settings. It looks like this:
- Click administrators and click create administrator and enter a name for the chatbot and click OK.
- Give it a display name, password and enable the account
- Leave access order set to "deny/allow" and also don't add any deny Patterns or allow Patterns.
- Click Save and your done.
Note: For the security minded folks a template for permissions will be added soon.
Note: The display name is the name people will see, the username is what Magicked will use to login.
The heart of Magicked's configuration is in magicked_admin.conf
all of your servers setting will be contained within one magicked_admin.conf
file, however, each server will need it's own entry. You can find your magicked_admin.conf
file in Magicked's root directory. It should look something like this:
[DEFAULT]
log_level = INFO
[server_one]
address = 127.0.0.1:8080
username = Admin
password = 123
game_password = Game_Password
motd_scoreboard = False
scoreboard_type = kills
enable_greeter = True
A server containing multiple entries will look something like this:
[DEFAULT]
log_level = INFO
[server_one]
address = 127.0.0.1:8080
username = Admin
password = 123
game_password = Game_Password
motd_scoreboard = False
scoreboard_type = kills
enable_greeter = True
[server_two]
address = 127.0.0.1:8081
username = Admin
password = 123
game_password = Game_Password
motd_scoreboard = False
scoreboard_type = kills
enable_greeter = True
Current Configuration Options:
-
log_level <INFO|DEBUG|WARNING>
- The log level,INFO
is the standard log level. -
Address
- The address which Magicked will connect to. If you are running Magicked on the same machine as your server is running on you can keepaddress
as127.0.0.1
and just change the port number to the web-admin port number. If you run your server on another machine you will need to changeaddress
from127.0.0.1
to the public IP of the machine your server is hosted on in addition to the port number. This would be the IP that you would connect to in game plus the web-admin port number. -
Username
- Configuring the username of the web admin account you would like Magicked to communicate through. -
Password
- Should match the password of the web admin account you would like Magicked to communicate through. -
game_password
- Configuring your servers game password. Set this to whatever you would like. -
motd_scoreboard <True|False>
- Enabling and disabling the MOTD scoreboard. -
scoreboard_type <kills|dosh>
- Setting the scoreboard type to either kills or dosh. -
enable_greeter <True|False>
- Enabling or disabling the greeter.
Note: You can configure default options by placing them under[DEFAULT]
Magicked offers the ability to create a scoreboard and manage your MOTD through .motd files. Each server found in magicked_admin.conf
will require it's own .motd file. If you are using the default Magicked configuration your .motd file will be server_one.motd
To create a new MOTD init copy your default .motd file and rename it to <your server name>_motd.init
Repeat this process for each entry in magicked_admin.conf
If you take a look at the default MOTD init it should look something like this:
Welcome to our server.
%SRV_K Zeds killed on this server.
Top Players (total kills):
1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR]
4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR]
7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR]
Have fun and good luck!
Magicked has several modifiers that will be populated with values from Magicked's databases they are:
-
%PLR
- player name -
%SCR
- player kills or dosh (Set inmagicked_admin.conf
) -
%SRV_K
- server kills -
%SRV_D
- server dosh
Note: If there has not been enough players, the scoreboard will still have some "%PLR [%SCR]" in it. Wait for more players and all 9 places will be filled with player names and player kills/player dosh. Additionally the scoreboard updates every 5 minutes.
Here is an example MOTD showcasing what can be achieved.
Source:
<font color="#FF8C00" size="30">Welcome to <b>Noobs R US</b>. Hosted in <b>UK</b>.</font>
<font color="#8B0000"><b>Maps Updated : 29th March 2018 | Server IP : 80.3.113.1:7779</b></font>
<font color="#6495ED" size="25">= - = - = - = - = - = - = - =</font>
<font color="#8B0000"><b>Top Players by Kills ↓↓ | Total Kills = %SRV_K | Total Dosh = %SRV_D
<font color="#FF8C00"> 1. %PLR [%SCR] 2. %PLR [%SCR] 3. %PLR [%SCR]
4. %PLR [%SCR] 5. %PLR [%SCR] 6. %PLR [%SCR]
7. %PLR [%SCR] 8. %PLR [%SCR] 9. %PLR [%SCR]</font>
<font color="#6495ED" size="25">= - = - = - = - = - = - = - =</font>
<font color="#8B0000"><b>Player Commands : !help, !info, !kills, !dosh, !me, !stats ↓↓↓↓↓
!top_kills, !top_dosh, !server_kills, !server_dosh
!steam_group, !admin_contact, !server_info</b></font>
Note: If you would like more information on how to change the text color and size see this guide and go to the Welcome Screen Explained section.
Templates
Magicked allows you to have scripted messages and issue various commands. Commands are set through .init files. Much like your welcome screen each server found in magicked_admin.conf
will require it's own .init file. If you ran magicked admin with the default configuration your .init file will be server_one.init
.
To create a new init copy your default .init file and rename it to <your server name>.init
Repeat this process for each entry in magicked_admin.conf
\
Some examples of what you can do are:
- advertisement messages like "Join our steam group" or "Like the server? Favorite it."
- Wave recaps.
- Messages when the trader has opened.
- Toggling the password after a certain wave.
The current options for command configuration are:
-
start_tc
- Timed command that executes every # seconds. -
start_wc
- Wave command, executes on a specific wave. -
start_trc
- Trader command, executes when the trader opens.
Let's take a look at an example init file:
start_tc 120 say Like the Server? Favorite it!
start_wc 1 say I'm a bot, type !help for usage.
start_trc say Traders Open! Gear up! Heal Up!
start_trc top_dosh -w
start_trc top_kills -w
Here's what these commands actually do, it's quite simple.
start_tc 120 say Like the Server? Favorite it!
What this does, is it starts a Timed Command that executes every 120 seconds, which will say "Like the Server? Favorite it!" in Game Chat.\
start_wc 1 say I'm a bot, type !help for usage.
This will post a message in game chat on Wave 1 that says "I'm a bot, type !help for usage.".
start_trc say Traders Open! Gear up! Heal Up!
This will post a message whenever the Trader Opens and it will say "Traders Open! Gear up! Heal Up!"
start_trc top_dosh -w
This will post a message after every wave saying which player earned the most dosh
start_trc top_kills -w
This will post a message after every wave saying which player killed the most zeds
Note: If you do not want to use this feature, you can open the file and delete all of the text.
Templates
!me - Description display a summary of your stats - Example:
- !stats player - display a summary of player's stats
- Example:
- !help - displays the help text in chat
- Example:
- !info - displays information about this project
- Example:
- !dosh - display the players recorded dosh and rank by dosh
- Example:
- !top_dosh - displays the players with the highest recorded dosh
- Example:
- !kills - display the players recorded kills and rank by kills
- Example:
- !top_kills - displays the players with the most recorded kills
- Example:
- !server_kills - displays total number of zeds killed on the server
- Example:
- !server_dosh - displays total dosh earned on the server
- Example:
- !difficulty {normal|hard|suicidal|hell} - sets difficulty of next game
- Example: !difficulty hard
- !length {short|medium|long} - sets length of next game
- Example: !length medium
- !start_tc n command - repeat command every n seconds
- Example: !start_tc 5 say test
- !stop_tc - stop all timed commands
- !start_wc n command - run command when wave n is reached.
- Example: !start_wc say Wave Started. - posts a message EVERY wave.
- Example: !start_wc 4 say Wave 4 Started. - This posts a message when wave 4 starts.
- !stop_wc - stop all wave commands
- !start_trc command - run command every time the trader opens
- Example: !start_trc say Traders open.
- !stop_trc - stop trader commands
- !say mesg - display mesg in the chat, generally for use in conjuction with other commands
- Example: !say This is an example.
- !silent - toggles output in chat
- !restart - immediately restarts the current map
- !load_map map_name - immediately loads map_name
- !toggle_pass - toggles the configured game password (specified in
magicked_admin.conf
)
Access Plus is a tool created by Marco and currently maintained by Freebase than extends the built in console commands and is a great supplement to Magicked.
If you are looking for more challenging gameplay and also like statistics, checkout Tiger's build of Controlled Difficulty which includes various statistics such as amount of large zeds killed and accuracy.