• 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 sos sos sos

This is because Server Perks supports up to 200 Millions of damage, when you earn more than that, it starts making problems. To fix that you will have to edit ServerPerksP.u.

You can fix that by doing this:
Find the function static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )

In this function you will see a default formula that will calculate how much damage you will need for the final level. In your case it is 251.

default:
FinalInt = X + GetDoubleScaling(CurLevel, Y); //Where X and Y are some numbers

You will have to calculate the max damage to be 200 Millions.
GetDoubleScaling = Your max level - 6 = 251 - 6 = 245
Therefore:
FinalInt = X + 245 * 245 * Y
You have to play with these X and Y numbers to get it right. Use the calculator to do that.
 
  • Like
Reactions: fengxue0108
Upvote 0
Toblerone;n2265790 said:
This is because Server Perks supports up to 200 Millions of damage, when you earn more than that, it starts making problems. To fix that you will have to edit ServerPerksP.u.

You can fix that by doing this:
Find the function static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )

In this function you will see a default formula that will calculate how much damage you will need for the final level. In your case it is 251.

default:
FinalInt = X + GetDoubleScaling(CurLevel, Y); //Where X and Y are some numbers

You will have to calculate the max damage to be 200 Millions.
GetDoubleScaling = Your max level - 6 = 251 - 6 = 245
Therefore:
FinalInt = X + 245 * 245 * Y
You have to play with these X and Y numbers to get it right. Use the calculator to do that.

first thank you , but i also do not know "X" mean
 
Upvote 0
fengxue0108;n2267645 said:
first thank you , but i also do not know "X" mean

X is a number, any number.

For example, look at this code:

Code:
class SRVetDemolitions extends SRVeterancyTypes
    abstract;

static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )
{
    switch( CurLevel )
    {
    case 0:
        FinalInt = 10000;
        break;
    case 1:
        FinalInt = 25000;
        break;
    case 2:
        FinalInt = 100000;
        break;
    case 3:
        FinalInt = 500000;
        break;
    case 4:
        FinalInt = 1500000;
        break;
    case 5:
        FinalInt = 3500000;
        break;
    case 6:
        FinalInt = 5500000;
        break;
    default:
        FinalInt = 5500000+GetDoubleScaling(CurLevel,500000);
    }
    return Min(StatOther.RExplosivesDamageStat,FinalInt);
}

What you have to do is calculate the max damage. In your case you have 251 MAX LVLS.

FinalInt = 5500000+GetDoubleScaling(CurLevel,500000);

Therefore FinalInt = 5 500 000 + 245 * 245 * 500 000

FinalInt = 30 018 000 000 DAMAGE required for level 251
Decrease 500 000 and 5 500 000 to make it work.
 
Upvote 0