blizzless-diiis icon indicating copy to clipboard operation
blizzless-diiis copied to clipboard

Level cap on paragon levels? (Level 516)

Open Baaleos opened this issue 1 year ago • 0 comments

There seems to be some funky logic going on in Player.cs I don't know if it is intentional, but it results in paragon levels being capped at 516.

if (Attributes[GameAttributes.Alt_Level] >= 515)
{
    var XPcap = 91.262575239831f * Math.Pow(Attributes[GameAttributes.Alt_Level], 3) -
                44301.083380565047f * Math.Pow(Attributes[GameAttributes.Alt_Level], 2) +
                3829010.395566940308f * Attributes[GameAttributes.Alt_Level] + 322795582.543823242188f;
    addedExp = (int)((float)(ParagonLevelBorders[Attributes[GameAttributes.Alt_Level]] / XPcap) * addedExp);
}

Ran this in debugger in VS

If I skip this if statement - the paragon levels can exceed level 516 However if the if statement is kept in place- it places a cap on the paragon level to level 516.

Is this an intentional cap?

Going from level 520 to 521 - via levelup command (note - my character skipped this if statement, which is how he is 520) But this logic seems to be preventing all levelups from 516 onwards. Example numbers below - as seen in visual studio debugger.

91.262575239831f * Math.Pow(Attributes[GameAttributes.Alt_Level], 3) = 12832247898.4375
44301.083380565047f * Math.Pow(Attributes[GameAttributes.Alt_Level], 2) = 11979012581.25
3829010.395566940308f * Attributes[GameAttributes.Alt_Level] + 322795582.543823242188f = 2.313881E+09

xpCap = 3167116341.1875

addedExp is then reduced to below 1xp by (ParagonLevelBorders[Attributes[GameAttributes.Alt_Level]] / XPcap)

It yields this number: 0.72012510886949344 Which when converted to int becomes 0 Hence the lack of level up beyond 516.

Baaleos avatar Mar 25 '23 22:03 Baaleos