• 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

Hey I was wondering if anyone can varify if they are getting this problem with the latest serverperks version.
[url]http://forums.tripwireinteractive.com/showthread.php?t=64568[/URL]

Im trying to track down what exactly this problem is coming from as it is kicking people randomly out of my server all with same error. Demon has said about having this problem too so I thought it might by through this mutator.
 
Upvote 0
Hey I was wondering if anyone can varify if they are getting this problem with the latest serverperks version.
http://forums.tripwireinteractive.com/showthread.php?t=64568http://forums.tripwireinteractive.com/showthread.php?t=64568

Im trying to track down what exactly this problem is coming from as it is kicking people randomly out of my server all with same error. Demon has said about having this problem too so I thought it might by through this mutator.

serverperk with some extra things ... to me it looks like this extra might be the problem, just serverperk itself might not be able to generate this kind of error.

my suggestion is that you should get the plain serverperk and start adding this extra thing and test it one by one. there is no need to code the perk yet just add whatever extra in your version first. save the coding for last

__________________________
 
Last edited:
Upvote 0
serverperk with some extra things ... to me it looks like this extra might be the problem, just serverperk itself might not be able to generate this kind of error.

my suggestion is that you should get the plain serverperk and start adding this extra thing and test it one by one. there is no need to code the perk yet just add whatever extra in your version first. save the coding for last

__________________________
Actually I have quite a bit of custom stuff inside it. What I basically did was add a few weapons and then I copied over the new code that was different from the version I had compared to Marco's newest version.
 
Upvote 0
Bit confused here.
I just tried the serverperks on my KF server.
Just your standard 6 player server, and was only adding it to have a bit of fun.

however when I add it, it just will not work :(
I added ServerPerksV4.ServerPerksMut to the launch line, but when you join the server you are still your same steam based perk levels (I set it to min LV20 max LV50).

I tried changing the order the mutators are listed in, also tried having it as the only mutator, with no luck.
It does list the mutator in the mutators page, however every time I pick a mutator from there webadmin always has a hissy fit with me and refuses my login info until I restart the server.

So any advice would help.
Antiblock, brute, and Patriarch HP left all load fine, so I have no idea what I have done wrong with ServerperksV4.
Thanks.
 
Upvote 0
Bit confused here.
I just tried the serverperks on my KF server.
Just your standard 6 player server, and was only adding it to have a bit of fun.

however when I add it, it just will not work :(
I added ServerPerksV4.ServerPerksMut to the launch line, but when you join the server you are still your same steam based perk levels (I set it to min LV20 max LV50).

I tried changing the order the mutators are listed in, also tried having it as the only mutator, with no luck.
It does list the mutator in the mutators page, however every time I pick a mutator from there webadmin always has a hissy fit with me and refuses my login info until I restart the server.

So any advice would help.
Antiblock, brute, and Patriarch HP left all load fine, so I have no idea what I have done wrong with ServerperksV4.
Thanks.
1.) Did you add the ServerPackages=ServerPerksV4 in your server.ini?
2.) Have you got the mutator for sure loading up in the mapvote configuration/start-up command line?
 
Upvote 0
hey I was wondering if someone could help me change this code to stop picking random perk but to choose a specific perk?

Code:
final function Class<SRVeterancyTypes> PickRandomPerk()
{
 local array< class<SRVeterancyTypes> > CA;
 local int i;
 for( i=0; i<CachePerks.Length; i++ )
 {
  if( CachePerks[i].PerkClass!=None && CachePerks[i].CurrentLevel>0 )
   CA[CA.Length] = CachePerks[i].PerkClass;
 }
 if( CA.Length==0 )
  return None;
 return CA[Rand(CA.Length)];
}

I want to replace it with an empty perk that has instructions for my server when ForcePerk setting is on.
 
Upvote 0
How to make to lower prices on custom item

Code:
static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item)
{
	if ( Item == class'ChainsawPickup' || Item == class'KatanaPickup'[B] || Item == class'M7A3MPickup'[/B])
		return FMax(0.9 - (0.10 * float(KFPRI.ClientVeteranSkillLevel)),0.1); // Up to 70% discount on Melee Weapons
	return 1.0;
}


M7A3MPickup is only for example.
 
Upvote 0
hey I was wondering if someone could help me change this code to stop picking random perk but to choose a specific perk?

Code:
...
I want to replace it with an empty perk that has instructions for my server when ForcePerk setting is on.
You mean simply like:
Code:
final function Class<SRVeterancyTypes> PickRandomPerk()
{
    return class'MyCustomPerk';
}
?

How to make to lower prices on custom item
Code:
...
M7A3MPickup is only for example.
You just have to make custom perk classes and set server to use them.
 
  • Like
Reactions: tryk
Upvote 0
Hey Marco, for some reason this isn't working whether I have the setting on or off.

Can a little more detail ?
Basically that code you shown was saying that the weapon will be given 10% discount every level but will cap at 90% (0.1 - 10% will be the price it will drop minimum).

Code:
static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item)
{
    if ( [COLOR=lime]Item == class'ChainsawPickup'[/COLOR] ||[COLOR=lime] Item == class'KatanaPickup'[/COLOR][B] || [COLOR=lime]Item == class'M7A3MPickup'[/COLOR][/B])
        return FMax[COLOR=red](0.9 - (0.10 * float(KFPRI.ClientVeteranSkillLevel))[/COLOR],[COLOR=deepskyblue]0.1[/COLOR]); // Up to 70% discount on Melee Weapons
    return 1.0;
}

Right to clear it up a little more i've coloured it.
Green = This is the items that the discount will take place.
Red = This is the price being taken away. Basically it's saying 0.1 times by the level you are and then -0.9.
Blue = This is saying that the price discount can ONLY be a minimum of 0.1 (so 10% of the original price).
 
Last edited:
Upvote 0
Thanks for that is very useful, but I needed how to add custom weapon to that list ex. IJCWeaponPack-W2.M7A3MPickup I tried to insert into class'here' IJCWeaponPack-W2.M7A3MPickup ( class'IJCWeaponPack-W2.M7A3MPickup' ) and this like M7A3MPickup (class'M7A3MPickup' ) compiler doesn't compile ServerPerksV4.

Log file:


Code:
Uninitialized: Log file open, 10/02/11 14:30:01
Uninitialized: STEAMAUTH : SteamAPI_Init failed
Init: Name subsystem initialized
Init: Detected: Microsoft Windows NT 6.1 (Build: 7601)
Init: Version: 3339 (128.29)
Init: Compiled: Jul 26 2011 11:41:50
Init: Command line: 
Init: Character set: Unicode
Init: Base directory: C:\KillingFloor1\system\
Init: Ini:KillingFloor.ini   UserIni:User.ini
Init: Build label:  Build UT2004_Build_[2004-11-11_10.48]
Init: Object subsystem initialized
Heading: ----------------------------Core - Release----------------------------
Heading: ---------------------------Engine - Release---------------------------
Heading: ----------------------------Fire - Release----------------------------
Heading: ---------------------------Editor - Release---------------------------
Heading: --------------------------UnrealEd - Release--------------------------
Heading: ---------------------------IpDrv - Release----------------------------
Heading: ----------------------------UWeb - Release----------------------------
Heading: --------------------------GamePlay - Release--------------------------
Heading: -------------------------UnrealGame - Release-------------------------
Heading: ---------------------------XGame - Release----------------------------
Heading: -------------------------XInterface - Release-------------------------
Heading: ---------------------------XAdmin - Release---------------------------
Heading: -------------------------XWebAdmin - Release--------------------------
Heading: ---------------------------GUI2K4 - Release---------------------------
Heading: --------------------------xVoting - Release---------------------------
Heading: --------------------------UTV2004c - Release--------------------------
Heading: --------------------------UTV2004s - Release--------------------------
Heading: -------------------------ROEffects - Release--------------------------
Heading: --------------------------ROEngine - Release--------------------------
Heading: ------------------------ROInterface - Release-------------------------
Heading: ---------------------------Old2k4 - Release---------------------------
Heading: ---------------------------KFMod - Release----------------------------
Heading: ---------------------------KFChar - Release---------------------------
Heading: ---------------------------KFGui - Release----------------------------
Heading: -------------------------GoodKarma - Release--------------------------
Heading: ------------------------ServerPerkV4 - Release------------------------
Warning: Failed to load 'ServerPerkV4.u': Can't find file 'ServerPerkV4.u'
Warning: Failed loading package: Can't find file 'ServerPerkV4.u'
Log: Analyzing...
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\ClientPerkRepLink.uc)
Log: Class: ClientPerkRepLink extends LinkedReplicationInfo
Log: Imported: Class ServerPerkV4.ClientPerkRepLink
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\DatabaseUdpLink.uc)
Log: Class: DatabaseUdpLink extends UdpLink
Log: Imported: Class ServerPerkV4.DatabaseUdpLink
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\KFPCServ.uc)
Log: Class: KFPCServ extends KFPlayerController
Log: Imported: Class ServerPerkV4.KFPCServ
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\KFVetEarnedMessagePL.uc)
Log: Class: KFVetEarnedMessagePL extends CriticalEventPlus
Log: Imported: Class ServerPerkV4.KFVetEarnedMessagePL
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\KFVetEarnedMessageSR.uc)
Log: Class: KFVetEarnedMessageSR extends CriticalEventPlus
Log: Imported: Class ServerPerkV4.KFVetEarnedMessageSR
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\ServerPerksMut.uc)
Log: Class: ServerPerksMut extends Mutator
Log: Imported: Class ServerPerkV4.ServerPerksMut
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\ServerStStats.uc)
Log: Class: ServerStStats extends KFSteamStatsAndAchievements
Log: Imported: Class ServerPerkV4.ServerStStats
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\ServerTempStats.uc)
Log: Class: ServerTempStats extends KFSteamStatsAndAchievements
Log: Imported: Class ServerPerkV4.ServerTempStats
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRBuyMenuSaleList.uc)
Log: Class: SRBuyMenuSaleList extends KFBuyMenuSaleList
Log: Imported: Class ServerPerkV4.SRBuyMenuSaleList
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRBuyMenuSaleListBox.uc)
Log: Class: SRBuyMenuSaleListBox extends KFBuyMenuSaleListBox
Log: Imported: Class ServerPerkV4.SRBuyMenuSaleListBox
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRGUIBuyMenu.uc)
Log: Class: SRGUIBuyMenu extends GUIBuyMenu
Log: Imported: Class ServerPerkV4.SRGUIBuyMenu
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRHUDKillingFloor.uc)
Log: Class: SRHUDKillingFloor extends HUDKillingFloor
Log: Imported: Class ServerPerkV4.SRHUDKillingFloor
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRInvasionLoginMenu.uc)
Log: Class: SRInvasionLoginMenu extends KFInvasionLoginMenu
Log: Imported: Class ServerPerkV4.SRInvasionLoginMenu
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRKFBuyMenuInvList.uc)
Log: Class: SRKFBuyMenuInvList extends KFBuyMenuInvList
Log: Imported: Class ServerPerkV4.SRKFBuyMenuInvList
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRKFBuyMenuInvListBox.uc)
Log: Class: SRKFBuyMenuInvListBox extends KFBuyMenuInvListBox
Log: Imported: Class ServerPerkV4.SRKFBuyMenuInvListBox
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRKFQuickPerkSelect.uc)
Log: Class: SRKFQuickPerkSelect extends KFQuickPerkSelect
Log: Imported: Class ServerPerkV4.SRKFQuickPerkSelect
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRKFTab_BuyMenu.uc)
Log: Class: SRKFTab_BuyMenu extends KFTab_BuyMenu
Log: Imported: Class ServerPerkV4.SRKFTab_BuyMenu
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRKFTab_Perks.uc)
Log: Class: SRKFTab_Perks extends KFTab_Perks
Log: Imported: Class ServerPerkV4.SRKFTab_Perks
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRLevelCleanup.uc)
Log: Class: SRLevelCleanup extends Interaction
Log: Imported: Class ServerPerkV4.SRLevelCleanup
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRLobbyChat.uc)
Log: Class: SRLobbyChat extends KFLobbyChat
Log: Imported: Class ServerPerkV4.SRLobbyChat
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRLobbyFooter.uc)
Log: Class: SRLobbyFooter extends LobbyFooter
Log: Imported: Class ServerPerkV4.SRLobbyFooter
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRLobbyMenu.uc)
Log: Class: SRLobbyMenu extends LobbyMenu
Log: Imported: Class ServerPerkV4.SRLobbyMenu
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRPerkProgressList.uc)
Log: Class: SRPerkProgressList extends KFPerkProgressList
Log: Imported: Class ServerPerkV4.SRPerkProgressList
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRPerkProgressListBox.uc)
Log: Class: SRPerkProgressListBox extends KFPerkProgressListBox
Log: Imported: Class ServerPerkV4.SRPerkProgressListBox
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRPerkSelectList.uc)
Log: Class: SRPerkSelectList extends KFPerkSelectList
Log: Imported: Class ServerPerkV4.SRPerkSelectList
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRPerkSelectListBox.uc)
Log: Class: SRPerkSelectListBox extends KFPerkSelectListBox
Log: Imported: Class ServerPerkV4.SRPerkSelectListBox
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRProfilePage.uc)
Log: Class: SRProfilePage extends KFProfilePage
Log: Imported: Class ServerPerkV4.SRProfilePage
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRStatList.uc)
Log: Class: SRStatList extends GUIVertList
Log: Imported: Class ServerPerkV4.SRStatList
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRStatListBox.uc)
Log: Class: SRStatListBox extends GUIListBoxBase
Log: Imported: Class ServerPerkV4.SRStatListBox
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRTab_MidGamePerks.uc)
Log: Class: SRTab_MidGamePerks extends KFTab_MidGamePerks
Log: Imported: Class ServerPerkV4.SRTab_MidGamePerks
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRTab_MidGameStats.uc)
Log: Class: SRTab_MidGameStats extends MidGamePanel
Log: Imported: Class ServerPerkV4.SRTab_MidGameStats
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRTab_Profile.uc)
Log: Class: SRTab_Profile extends KFTab_Profile
Log: Imported: Class ServerPerkV4.SRTab_Profile
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRVetBerserker.uc)
Log: Class: SRVetBerserker extends SRVeterancyTypes
Log: Imported: Class ServerPerkV4.SRVetBerserker
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRVetCommando.uc)
Log: Class: SRVetCommando extends SRVeterancyTypes
Log: Imported: Class ServerPerkV4.SRVetCommando
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRVetDemolitions.uc)
Log: Class: SRVetDemolitions extends SRVeterancyTypes
Log: Imported: Class ServerPerkV4.SRVetDemolitions
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRVeterancyTypes.uc)
Log: Class: SRVeterancyTypes extends KFVeterancyTypes
Log: Imported: Class ServerPerkV4.SRVeterancyTypes
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRVetFieldMedic.uc)
Log: Class: SRVetFieldMedic extends SRVeterancyTypes
Log: Imported: Class ServerPerkV4.SRVetFieldMedic
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRVetFirebug.uc)
Log: Class: SRVetFirebug extends SRVeterancyTypes
Log: Imported: Class ServerPerkV4.SRVetFirebug
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRVetSharpshooter.uc)
Log: Class: SRVetSharpshooter extends SRVeterancyTypes
Log: Imported: Class ServerPerkV4.SRVetSharpshooter
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\SRVetSupportSpec.uc)
Log: Class: SRVetSupportSpec extends SRVeterancyTypes
Log: Imported: Class ServerPerkV4.SRVetSupportSpec
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\ServerPerkV4\Classes\StatsObject.uc)
Log: Class: StatsObject extends Object
Log: Imported: Class ServerPerkV4.StatsObject
Log: Parsing SRLevelCleanup
Log: Parsing ClientPerkRepLink
Log: Parsing ServerPerksMut
Log: Parsing DatabaseUdpLink
Log: Parsing KFVetEarnedMessagePL
Log: Parsing KFVetEarnedMessageSR
Log: Parsing SRVeterancyTypes
Log: Parsing SRVetBerserker
Log: Parsing SRVetCommando
Log: Parsing SRVetDemolitions
Log: Parsing SRVetFieldMedic
Log: Parsing SRVetFirebug
Log: Parsing SRVetSharpshooter
Log: Parsing SRVetSupportSpec
Log: Parsing KFPCServ
Log: Parsing SRHUDKillingFloor
Log: Parsing ServerStStats
Log: Parsing ServerTempStats
Log: Parsing SRTab_MidGamePerks
Log: Parsing SRTab_MidGameStats
Log: Parsing SRKFTab_BuyMenu
Log: Parsing SRTab_Profile
Log: Parsing SRKFTab_Perks
Log: Parsing SRLobbyFooter
Log: Parsing SRLobbyMenu
Log: Parsing SRGUIBuyMenu
Log: Parsing SRInvasionLoginMenu
Log: Parsing SRLobbyChat
Log: Parsing SRProfilePage
Log: Parsing SRKFBuyMenuInvListBox
Log: Parsing SRPerkSelectListBox
Log: Parsing SRBuyMenuSaleListBox
Log: Parsing SRPerkProgressListBox
Log: Parsing SRStatListBox
Log: Parsing SRKFQuickPerkSelect
Log: Parsing SRKFBuyMenuInvList
Log: Parsing SRBuyMenuSaleList
Log: Parsing SRPerkSelectList
Log: Parsing SRPerkProgressList
Log: Parsing SRStatList
Log: Parsing StatsObject
Log: Compiling SRLevelCleanup
Log: Compiling ClientPerkRepLink
Log: Compiling ServerPerksMut
Log: Compiling DatabaseUdpLink
Log: Compiling KFVetEarnedMessagePL
Log: Compiling KFVetEarnedMessageSR
Log: Compiling SRVeterancyTypes
Log: Compiling SRVetBerserker
Log: Compiling SRVetCommando
Log: Compiling SRVetDemolitions
Log: Compiling SRVetFieldMedic
[COLOR="Red"]Error: C:\KillingFloor1\ServerPerkV4\Classes\SRVetFieldMedic.uc(98) : Error, Can't find Class 'M7A3MPickup'
[/COLOR]Log: Compile aborted due to errors.
Log: Failure - 1 error(s), 0 warning(s)
Exit: Preparing to exit.
Log: Purging garbage
Log: Unbound to Core.dll
Log: Unbound to Editor.dll
Log: Unbound to Engine.dll
Exit: Editor shut down
Log: Unbound to Fire.dll
Log: Unbound to IpDrv.dll
Log: Unbound to UWeb.dll
Log: Unbound to XGame.dll
Log: Unbound to XInterface.dll
Log: Unbound to ROEngine.dll
Log: Garbage: objects: 88314->0; refs: 0
Exit: Object subsystem successfully closed.
Exit: Exiting.
Log: FileManager: Reading 0 GByte 200 MByte 597 KByte 198 Bytes from HD took 1.590012 seconds (1.446012 reading, 0.144000 seeking).
Log: FileManager: 0.120000 seconds spent with misc. duties
Uninitialized: Name subsystem shut down
Uninitialized: Allocation checking disabled
Uninitialized: Log file closed, 10/02/11 14:30:08

And code:

Code:
// Change the cost of particular items
static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item)
{
	if ( Item == class'Vest' )
		return FMax(0.9 - (0.10 * float(KFPRI.ClientVeteranSkillLevel)),0.1f);  // Up to 70% discount on Body Armor
	else if ( Item == class'MP7MPickup'[COLOR="Red"] || Item == class'M7A3MPickup'[/COLOR] )
		return FMax(0.15 - (0.02 * float(KFPRI.ClientVeteranSkillLevel)),0.02f);  // Up to 95% discount on Medic Gun
	return 1.0;
}
 
Last edited:
Upvote 0