• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Mut: Per Server Stats

Marco

Grizzled Veteran
May 23, 2009
644
230
Finland
This mutator brings the perks stats tracking back the way it were in KF 2.5 in Unreal Tournament 2004: All player stats are being tracked by the server individually.

Download from here
. (Version 7.50)
Download source code from here. (Version 7.50)

Note: You are not allowed to use this mutator for selling stats (for money) on your server. Also do not edit ServerPerks.u nor ServerPerksP.u without renaming them.

Upsides about this mutator:

  • It allows server host to run any mutator/modification/map they ever want without having to whitelist them all.
  • Server host can add/remove standard/custom perks (read tutorial from here).
  • Clients can't cheat their stats in offline games then join the server with level 5 everything.
  • Fixed some menu issues while at it.
  • Added option for custom weapons on trader to add (this mutator does not work with the existing Custom shop mutator).
  • Use custom skins (see how to create own from here).
  • As an admin you can edit any players stats using consolecommand: Mutate EditStats
  • Contains various bugfixes over default Killing Floor.
  • You can setup custom HTML server news page, read more about that from here.
And downsides of this mutator:

  • Clients will don't have their stats following from server to server (anything they do in that server will stay within that server)!
  • Achievements aren't earned.
Version history:
7.50:
Spoiler!

7.10:
Spoiler!

7.00:
Spoiler!

6.75:
Spoiler!

6.50:
Spoiler!

6.01:
- Fixed another crash, added new weapons to defaults and a script warning with emotion icons loading to serverpackages.
6.00:
Spoiler!

5.51:
Spoiler!

5.50:
Spoiler!

5.10:
Spoiler!

5.00:
Spoiler!

4.40:
Spoiler!
4.38:
Spoiler!
4.36:
Spoiler!
4.35:
Spoiler!
4.10:
Spoiler!
4.00:
Spoiler!
3.01:
Spoiler!
3.00:
Spoiler!
2.55:
Spoiler!
2.30:
Spoiler!
2.10:
Spoiler!
2.00:
Spoiler!
1.00:
- Released.

How to use this mutator (eighter way):

  • In mutators list, add "Server Veterancy Handler V6" to active mutators.
  • Add to server startup commandline "?Mutator=ServerPerksMut.ServerPerksMut"
To add/remove perks, simply edit "ServerPerks.ini" and add/remove lines.

CountryFlagsTex.utx is an optional country tags texture file. You can use my country tags mutator to give all players tags and this mutator will replace those tags with flag textures.

Server Perks Database (OPTIONAL)(Advanced users only!)

Download from here. (Version 1.55)
Download from here. Same version but without any windows at all (needs to be shut down from task manager).

Version history:
1.55:
- Fixed a stat loading bug from earlier versions.
- Modified it to convert Linux SteamID's into Windows SteamID.
1.30:
- Support long stat value string lines (REQUIRED since serverperks v5.00).
1.10:
- Optimized code a bit and added a new option.
1.00:
- Created.

This is an application I wrote in C++ which basically works as a remote database for your perks stats. In order to use this you need:
- A dedicated server machine that's on Windows OS.
- Setup a Port and Password in Host.ini:
[General]
Port=6000
Password="Pass"
- Do the same on ServerPerksV4.ini (including set IP-address or DNS name of the host):
[ServerPerksMut.ServerPerksMut]
RemotePort=6000
bUseRemoteDatabase=True
RemoteDatabaseURL=192.168.1.33
RemotePassword=Pass
- Make sure you allow the application to access internet through Firewall and/or Router (open the desired port).
- IF you have any earlier stats on server, copy over ServerPerksStat.ini to same folder as ServerPerksHost.exe and launch the exe as: ServerPerksHost.exe ServerPerksStat.ini
This way it will convert to the new stats ini file. After this is done delete all ServerPerksStat.ini you have.
- Now simply launch up KillingFloor server as-well as ServerPerksHost.exe.
- If you want to convert Data.ini back to ServerPerksStat.ini, run: ServerPerksHost.exe UNDO

Using FTP protocol for database in ServerPerks v7
Make sure you assign these settings in ServerPerks.ini:
RemoteDatabaseURL=www.somedomain.com - URL address to FTP server.
RemotePassword=Pass - User password to access FTP server.
RemoteFTPUser=User - User name to access FTP server.
RemoteFTPDir= - Optional, leave empty if you want it to write stats in root folder, otherwise you can enter folder name there (but make sure that folder exist or system will fail).
bUseRemoteDatabase=True - MUST be enabled.
bUseFTPLink=True - Must also be enabled.
bDebugDatabase=False - Enable this if you have trouble on getting it functional (will print communication information on log and webadmin).
FTPKeepAliveSec=60 - How often server will ping the FTP server to keep connection alive.
Be sure you limit the FTP user account that server uses as much as possible, as it's not a secure connection server will use.
In other words, ideal settings are:
Max connections - ~10 (or more depending on how many servers will use this).
Idle timeout - 120 seconds.
Only allow client to read/write files.

If you want to upload onto FTP current stats saved on server, enable following setting on ServerPerks.ini: bUploadAllStats=True. Then start game on solo and wait for it to finish uploading everything. I will add to ServerPerksHost application a way to convert Data.ini to ServerPerksStats.ini back again if you want to switch the host protocol of your server.

If there are any bugs, please report them here (or if you have any comments/suggestions)!
 
Last edited:
cool but i tried it in solo how does it work coz wen i spawned it sayed perks are disable. or does this only work on dedicated? or do i need to type something in chat? to enable it? also i had to remove it from my serve coz at the boss wave the boss dies instance. hope u can fix that its really nice idea!
 
Last edited:
Upvote 0
Author appear at the forum please
Yes, I am here.
It is a good mutator but you ak47 isn't support on commando, can you fix that???
I can make a seperate extension for perks that are exactly as retail ones. The code I based my perks on were pre-released version of KF.
cool but i tried it in solo how does it work coz wen i spawned it sayed perks are disable. or does this only work on dedicated? or do i need to type something in chat? to enable it? also i had to remove it from my serve coz at the boss wave the boss dies instance. hope u can fix that its really nice idea!
It should work in solo and online, might be some specific settings or combinations of other mutators you're using?
 
Upvote 0
Which I have found the list of defects in yours mutators:
1. Sometimes in game simply there is no choice percs though in ".ini" file the data arrive!;
2. On many times pressing "Esc" button or calling statistic window client crashing with error



3. Need To add operation of the new weapon though have checked up, like works;
4. Idea excellent especially for my server with 30 players!;
5. We wait the stable new version;
P.S. All files of mutator are necessary to the client? Or enough one loaded from server ServerPerks.u (with one it statistics works, percs shake)?
 
Last edited:
Upvote 0
Which I have found the list of defects in yours mutators:
1. Sometimes in game simply there is no choice percs though in ".ini" file the data arrive!;
2. On many times pressing "Esc" button or calling statistic window client crashing with error
3. Need To add operation of the new weapon though have checked up, like works;
P.S. All files of mutator are necessary to the client? Or enough one loaded from server ServerPerks.u (with one it statistics works, percs shake)?
1: I don't really understand what you mean by that...
2: Good to know, I'll look up on that.
3: Huh?
And yes, only ServerPerks.u is needed by the clients.

Why file ServerPerksStat.ini is in UTF-16 LE charset coding?
Thats how UnrealEngine 2 outputs INI files, not my choise.
 
Upvote 0
:(

:(

Works great! But does not store Demolitions. If you leave the server or change the map data is dumped! Please correct :(

ps start servers bat

@echo off
cls
echo Protecting srcds from crashes...
title log
:srcds
echo (%time%) KF server started.
start /wait ucc server KF-Bedlam.rom?game=KFmod.KFGameType?VACSecured=True?MaxPlayers=6?Mutator=ServerPerksV2.ServerPerksMut
echo (%time%) WARNING: srcds closed or crashed, restarting....
goto srcds
 
Last edited:
Upvote 0