• 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

Ok. Thank you Tendency. That is sufficiently clear that I should be able to muddle my way through and add custom weapons to a serverperks server. I'll give it a try with an gun done in english first. You've saved me quite a bit of hassle.

Now I've got to get to downloading all the Russian guns, and making sure there's no version mismatches. I believe that Gartley's patch still doesn't work if you don't have all of the weapons in the collection at once. Still, that's a lot better than the standstill i was at before.

Cheers.

Not a problem. Lets take the weapon from Gartley. We can add the Colt 1911 by editing the ServerPerks.ini file. Note: The weapon placement(number) is relative to the WeaponCategories. 0=Melee;1=Pistols etc.

So below is a section from a default ServerPerks.ini file. We will add the Colt 1911 to the last line, under TraderInventory!

TraderInventory=4:KFMod.M4203Pickup
TraderInventory=4:KFMod.M7A3MPickup
TraderInventory=2:KFMod.KSGPickup
TraderInventory=1:KFMod.MK23Pickup
TraderInventory=1:KFMod.DualMK23Pickup
TraderInventory=4:KFMod.FNFAL_ACOG_Pickup
TraderInventory=1:WM1911Pistol.ColtPickup
WeaponCategories=Melee
WeaponCategories=Pistol
WeaponCategories=Shotgun
WeaponCategories=Sniper
WeaponCategories=Machine Gun
WeaponCategories=Explosive
WeaponCategories=Flame Thrower

Now you will have the Colt 1911 under the Pistols section in the trader menu.

Note: You will need to add the .U file to the ServerPackages in the KillingFloor.ini so that people joining your server will download the files needed. see below.

[Engine.GameEngine]
CacheSizeMegs=32
UseSound=True
VoIPAllowVAD=False
ServerActors=IpDrv.MasterServerUplink
ServerActors=UWeb.WebServer
ServerPackages=Core
ServerPackages=Engine
ServerPackages=Fire
ServerPackages=Editor
ServerPackages=IpDrv
ServerPackages=UWeb
ServerPackages=GamePlay
ServerPackages=UnrealGame
ServerPackages=XGame
ServerPackages=XInterface
ServerPackages=GUI2K4
ServerPackag es=xVoting
ServerPackages=WM1911Pistol

Then you are set. If you need anything, just ask,
 
Last edited:
Upvote 0
Weapons will not gain perk discounts or bonuses unless they are coded into the perk files, some weapons if created correctly will continue to increment to the perk requirements though, this sually being Sharpshooter/Firebug/Support/Berserker/Demo weapons.

You should probably look into Poosh's ScN balance version, as his you can add weapons to, but you also have all the balances which you may not like.
Each balance features is configurable individually, so you can turn off what you don't like in the ScrnBalance.ini. There are global balance features, like bSpawnBalance and bWeaponFix. But you can also turn off balance features for individual guns, replacing ScrnBalance version of the weapon with original KFMod weapons in ServerPerks.ini.

Examples:
Code:
# (i) - comments start with #. Commented lines have no effect

# Bring back medic gun's drop exploit:
TraderInventory=7:KFMod.MP7MPickup
TraderInventory=7:KFMod.M7A3MPickup
#TraderInventory=7:ScrnBalance.ScrnMP7MPickup
#TraderInventory=7:ScrnBalance.ScrnM7A3MPickup

# Allow Crawler Infinite Burn:
TraderInventory=6:KFMod.MAC10Pickup
#TraderInventory=6:ScrnBalance.ScrnMAC10Pickup

# Bring back aiming glitch with dual pistols:
TraderInventory=1:KFMod.DualiesPickup
TraderInventory=1:KFMod.DualDeaglePickup
TraderInventory=1:KFMod.Dual44MagnumPickup
TraderInventory=1:KFMod.DualMK23Pickup
#TraderInventory=1:ScrnBalance.ScrnDualiesPickup
#TraderInventory=1:ScrnBalance.ScrnDualDeaglePickup
#TraderInventory=1:ScrnBalance.ScrnDual44MagnumPickup
#TraderInventory=1:ScrnBalance.ScrnDualMK23Pickup
 
Last edited:
Upvote 0
Has anybody tried to run ServerPerksHost on linux server (via wine)? Is it possible?

Sorry for triple post and quoting myself :)

I just got ServerPerksHost working under linux via Wine.
Here is a command, that allows it run even in text mode (runlevel 3), despite that wine requires X11:
Code:
[COLOR="Lime"]wineconsole --backend=curses ServerPerksHost.exe >/dev/null &[/COLOR]
Generally it works fine, but sometimes crashes wine server anyway. I think the problem is inside the display output generated by ServerPerksHost - even if it is redirected to nowhere (/dev/null), curses lib still gets it before (output redirection is on the linux level, not inside the emulator) and possibly it can make it crash.

Marco, can you make silent mode of ServerPerksHost please? I.e. it writes output only to a log file without writing to the window. This mode could be activated via a switch (e.g. ServerPerksHost.exe -s) of set in the config file (Host.ini).
If you could make a program to don't create a window at all, it would great!
 
Upvote 0
Unique ID ?

Unique ID ?

Hi - I was wondering the most appropriate way of restoring someones Perk Stats

I have players who need their perks restored from time to time because they wiped their hard drive and rebuilt it, or some other reason.

Ive been shutting the server down and just coping over the info from their old ServerperksStats.ini entry - But there is probably a more appropriate method for doing this ???


TIA
X
 
Upvote 0
Hi - I was wondering the most appropriate way of restoring someones Perk Stats

I have players who need their perks restored from time to time because they wiped their hard drive and rebuilt it, or some other reason.

Ive been shutting the server down and just coping over the info from their old ServerperksStats.ini entry - But there is probably a more appropriate method for doing this ???


TIA
X
Shouldn't it be the same User ID regardless if they format?
It may be the bUsePlayerNameAsID flag, set it to False to use the ID.
 
Upvote 0
Shouldn't it be the same User ID regardless if they format?
It may be the bUsePlayerNameAsID flag, set it to False to use the ID.

yes it is set to false - But ive seen others have problems associated to setting it as TRUE

ill deal with - Or write code to deal with resetting stats - just wanted to know if there is already a appropriate way to deal with it

:D
 
Upvote 0
LOL on another note - i hit Firebug level 31 last night and it no longer is adding stars to my perk - Ive not touched that part of the perks code either - it still shows me as 30 on my HUD - not a big deal as it shows it correctly every where else - just the number of stars has stopped

:D

Starts are drawn in 5 rows and 3 columns max (15 in total). So blue perk = level 15 + 15 stars = level 30 that can be drawn max.
 
Upvote 0
@Marco. Thank you very much for creating no-window version of Perks Database Server! Now Perks DB works perfectly under Linux, even if server runs in text mode (runlevel 3)!

A short guide how to install and make it work under Linux:
  1. Download Perks DB Server (ServerPerksHostNW).
  2. Install Wine server.
  3. Run Wine server in persistent mode:
    Code:
    wineserver -p
  4. Open directory, where ServerPerksHost is located, e.g. /opt/kfserver/db/:
    Code:
    cd /opt/kfserver/db/
  5. Launch ServerPerksHostNW via wineconsole emulator. Be sure to prevent a new window creation (--backend=curses) and disable any possible output (redirect to /dev/null), because it may crash wine server:
    Code:
    wineconsole --backend=curses ServerPerksHostNW.exe >/dev/null 2>&1 &
 
Upvote 0
@Marco. Thank you very much for creating no-window version of Perks Database Server! Now Perks DB works perfectly under Linux, even if server runs in text mode (runlevel 3)!

A short guide how to install and make it work under Linux:
  1. Download Perks DB Server (ServerPerksHostNW).
  2. Install Wine server.
  3. Run Wine server in persistent mode:
    Code:
    wineserver -p
  4. Open directory, where ServerPerksHost is located, e.g. /opt/kfserver/db/:
    Code:
    cd /opt/kfserver/db/
  5. Launch ServerPerksHostNW via wineconsole emulator. Be sure to prevent a new window creation (--backend=curses) and disable any possible output (redirect to /dev/null), because it may crash wine server:
    Code:
    wineconsole --backend=curses ServerPerksHostNW.exe >/dev/null 2>&1 &
Thank you Marco and poosh I will try today also with this.By the way how much wine+Serverhost will use cpu and ram?
Also is it possible to use ServerPerksHost on the same machine as KF server? I am questioning because having 2 servers with same serverperksstats.ini will not ovveride to that file ,but it will store in Killnig Floor itself and whne one of the crashes -boomm all stats weren't saved in .ini file .
 
Last edited:
Upvote 0
Thank you Marco and poosh I will try today also with this.By the way how much wine+Serverhost will use cpu and ram?
Also is it possible to use ServerPerksHost on the same machine as KF server? I am questioning because having 2 servers with same serverperksstats.ini will not ovveride to that file ,but it will store in Killnig Floor itself and whne one of the crashes -boomm all stats weren't saved in .ini file .

wineconsole cat eat a lot of CPU, so I'm suggesting to lower it's priority (raise NICE value). I'm running 2 server + ServerPerksHost on the same machine too - without any performance issues (old P4-3.20GHz CPU, 2GB RAM).
 
Upvote 0
wineconsole cat eat a lot of CPU, so I'm suggesting to lower it's priority (raise NICE value). I'm running 2 server + ServerPerksHost on the same machine too - without any performance issues (old P4-3.20GHz CPU, 2GB RAM).
Thank you much! By the way i am totaly noob at linux :) also i only control via ssh (rented VPS) so I don't know how to lower ,unleas you meant lower CPU usage with cpulimit? :)
 
Upvote 0
Thank you much! By the way i am totaly noob at linux :) also i only control via ssh (rented VPS) so I don't know how to lower ,unleas you meant lower CPU usage with cpulimit? :)

Raise its NICE value to lower priority. You can do it 2 ways:
a) when starting the process:
Code:
nice -n 10 wineconsole --backend=curses ServerPerksHostNW.exe >/dev/null 2>&1 &
b) re-nice already running process:
Code:
renice -n 10 -p <PID>
, where <PID> is a process id, which can be retrievied by:
Code:
ps ax | grep wineconsole | grep -v grep
First number you'll see in the output will be a PID.
 
Upvote 0