• 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, so I have decompiled the downloaded ServerPerksV4.u (pre-compiled version) and I have tried to compile it with doing no edits or modifications of any sort. However I still come up with this error:

Code:
C:\GameServers\KF1\ServerPerksV4\Classes\ServerStStats.uc(338) : Error, Redefini
tion of 'function AddKill' differs from original in KFSteamStatsAndAchievements

Compile aborted due to errors.

Failure - 1 error(s), 0 warning(s)

Any help with this? Just trying to get the hang of working with the whole Syntax of compiling/decompiling.

The function specification is roll back.
Fix it.

// Xmas version
// function AddKill(bool bLaserSightedEBRM14Headshotted, bool bMeleeKill, bool bZEDTimeActive)
function AddKill(bool bLaserSightedEBRM14Headshotted)

// Xmas version
// function AddBloatKill( bool bWithBullpup )
function AddBloatKill()

// Xmas version
// function AddSirenKill(bool bLawRocketImpact)
function AddSirenKill()

// Xmas version
// function KilledFleshpound(bool bWithMeleeAttack, bool bWithAA12, bool bWithKnife);
function KilledFleshpound(bool bWithMeleeAttack, bool bWithAA12);
 
Upvote 0
Ok so I'm having an error with this:

Correct me if I am wrong but this is what im reading:

- File: SRTab_MidGameStats
- Source of Error: StatSelectList
- Error: Contex in Object Property

Here is the compiler display:
Code:
Importing Defaults for SRStatList
Importing Defaults for StatsObject
Importing Defaults for SRTab_MidGamePerks
Importing Defaults for SRTab_MidGameStats
 
ObjectProperty ServerPerksV43.SRTab_MidGameStats.lb_PerkSelect: bad cast in 'SRS
tatListBox'ServerPerksV4.SRTab_MidGameStats.StatSelectList''
 
Importing Defaults for SRKFTab_BuyMenu
Importing Defaults for SRTab_Profile
Importing Defaults for SRKFTab_Perks
Compile aborted due to errors.
Failure - 1 error(s), 0 warning(s)

P.S. This is a fresh downloaded copy of the source decompiled from the already compiled version.
 
Last edited:
Upvote 0
The function specification is roll back.
Fix it.

// Xmas version
// function AddKill(bool bLaserSightedEBRM14Headshotted, bool bMeleeKill, bool bZEDTimeActive)
function AddKill(bool bLaserSightedEBRM14Headshotted)

// Xmas version
// function AddBloatKill( bool bWithBullpup )
function AddBloatKill()

// Xmas version
// function AddSirenKill(bool bLawRocketImpact)
function AddSirenKill()

// Xmas version
// function KilledFleshpound(bool bWithMeleeAttack, bool bWithAA12, bool bWithKnife);
function KilledFleshpound(bool bWithMeleeAttack, bool bWithAA12);

Commenting out some parts worked, thanks man
 
Upvote 0
Hey alright so this is now another error I get...

Importing Defaults for StatsObject
Importing Defaults for SRTab_MidGamePerks
Importing Defaults for SRTab_MidGameStats
Importing Defaults for SRKFTab_BuyMenu
Importing Defaults for SRTab_Profile
Importing Defaults for SRKFTab_Perks
Importing Defaults for SRGUIBuyMenu
Importing Defaults for SRProfilePage

Error opening file

History: UObject::SavePackage <- UMakeCommandlet::Main

Exiting due to error
 
Upvote 0
Function to return player's stats?

Function to return player's stats?

I have tried a zillion ways to do this but I can't seem to figure it out.

This is an example of that stat I want:
(From ServerStStats.uc)
MyStatsObject.KillsStat


No matter what I do I can't seem to get a player's stats info into my own mutator :(

I want to to some custom things without changing your code in ServerPerksV4 so that I can update it whenever you come out with updates.

I'm looking for a way to just return the integer (int) of something like a person's total kills.

Thanks in advance if anyone can help!
 
Upvote 0
i'm trying to use this with custom weapons (mk23 and etc.), but so far i can get this to work only with the price discount. the perk bonus is still no go =,= and also the added weapons don't disappear from the shop list after bought.

what i have done is merging some classes together, change the coding in the veterancy (add custom weapon classes).

so, i would like some advice on what do i need to add or change to add weapons into this mutator since i'm quite new to this.

anyway thanks for the mutators
 
Upvote 0
I have barely any experience on code, but i'm not sure how to make this mod "work" I extracted the files to the 'killing floor' folder. Not sure if i put in wrong place. Also i tried adding it to 'KFMutators list' and i had put this code in.

Code:
Mutator=(ClassName=KFMutators.ServerVeterancyHandlerV2,IconMaterialName=MutatorArt.nosym,FriendlyName=KFMutators.ServerVeterancyHandlerV2.FriendlyName,Description=KFMutators.ServerVeterancyHandlerV2.Description,FriendlyName=KFMutators.ServerVeterancyHandlerV2.FriendlyName,FallbackName="cperks",FallbackDesc="Advanced Perk Levels.")

(that code was in 1 line)
If someone could give me help with the problem or give me a brief guide on how
and where to install it, I'd greatly appreciate it.
 
Upvote 0
Hi , which is the line of code that i add in order to broadcast a chat message when somebody levels up to 11 and onwards?

Also, how do i add new functions for recording the kills of the different Zeds?

Adding new functions would allow even more custom perks to be created with different types of level up requirements.
 
Last edited:
Upvote 0
hello, I wanted to change your mutator, but I get an error when I compile the mutator without any change...:(
Can you help me?

modifs.png


Thx!
 
Upvote 0
The function specification is roll back.
Fix it.

// Xmas version
// function AddKill(bool bLaserSightedEBRM14Headshotted, bool bMeleeKill, bool bZEDTimeActive)
function AddKill(bool bLaserSightedEBRM14Headshotted)

// Xmas version
// function AddBloatKill( bool bWithBullpup )
function AddBloatKill()

// Xmas version
// function AddSirenKill(bool bLawRocketImpact)
function AddSirenKill()

// Xmas version
// function KilledFleshpound(bool bWithMeleeAttack, bool bWithAA12, bool bWithKnife);
function KilledFleshpound(bool bWithMeleeAttack, bool bWithAA12);


Please, can you explain how you doing?
I have this : (Addkill exemple)

function AddKill(bool bLaserSightedEBRM14Headshotted)
{
SetStatInt(KillsStat, KillsStat.Value + 1);

if ( bDebugStats )
log("STEAMSTATS: Adding Kill - NewKills="$KillsStat.Value @ "Player="$PCOwner.PlayerReplicationInfo.PlayerName);

if ( Achievements[KFACHIEVEMENT_KillXEnemies].bCompleted == 0 && KillsStat.Value >= Achievements[KFACHIEVEMENT_KillXEnemies].ProgressDenominator )
{
SetSteamAchievementCompleted(KFACHIEVEMENT_KillXEnemies);
}

if ( Achievements[KFACHIEVEMENT_KillXEnemies2].bCompleted == 0 && KillsStat.Value >= Achievements[KFACHIEVEMENT_KillXEnemies2].ProgressDenominator )
{
SetSteamAchievementCompleted(KFACHIEVEMENT_KillXEnemies2);
}

if ( Achievements[KFACHIEVEMENT_KillXEnemies3].bCompleted == 0 && KillsStat.Value >= Achievements[KFACHIEVEMENT_KillXEnemies3].ProgressDenominator )
{
SetSteamAchievementCompleted(KFACHIEVEMENT_KillXEnemies3);
}

if ( !bLaserSightedEBRM14Headshotted )
{
SetStatInt(LaserSightedEBRHeadshots, 0);

if ( bDebugStats )
log("STEAMSTATS: Reseting Laser Sighted EBRM14 Headshot Kills - NewKills="$LaserSightedEBRHeadshots.Value @ "Player="$PCOwner.PlayerReplicationInfo.PlayerName);
}
}


What should I do?

Thx for you help
 
Upvote 0