Update exp calcs to be out of 100

and adjust grading
This commit is contained in:
Ashnal 2025-04-26 20:13:10 -04:00
parent 1366f43ddd
commit d7d0507d45
2 changed files with 6 additions and 5 deletions

View file

@ -15499,8 +15499,8 @@ UINT16 K_GetDisplayEXP(player_t *player)
return UINT16_MAX;
// target is where you should be if you're doing good and at a 1.0 mult
fixed_t clampedexp = max(FRACUNIT/2, min(FRACUNIT*7/5, player->exp)); // clamp between 0.5 and 1.4
fixed_t targetdisplayexp = (500*player->gradingpointnum/numgradingpoints)<<FRACBITS;
fixed_t clampedexp = max(FRACUNIT/2, min(FRACUNIT*5/4, player->exp)); // clamp between 0.5 and 1.25
fixed_t targetdisplayexp = (100*player->gradingpointnum/numgradingpoints)<<FRACBITS;
UINT16 displayexp = FixedMul(clampedexp, targetdisplayexp)>>FRACBITS;
return displayexp;

View file

@ -244,8 +244,9 @@ INT32 level_tally_t::CalculateGrade(void)
{
// Use a special curve for this.
// Low Exp amounts are guaranteed, higher than half is where skill expression starts
const fixed_t frac = std::min(FRACUNIT, (laps * FRACUNIT) / std::max(1, static_cast<int>(totalLaps + 80))); // Magic number here is to ensure A ranks only go to those that can maintain positive EXP
ours += Easing_InCubic(frac, 0, bonusWeights[i]);
// Magic numbers here are to reduce the range from 50-125 to 0-75 and compare with a max of 58, 85% of which is 49.3, which should put an even 100 or higher displayexp at A rank
const fixed_t frac = std::min(FRACUNIT, ((laps-50) * FRACUNIT) / std::max(1, static_cast<int>(totalLaps-42)));
ours += Easing_Linear(frac, 0, bonusWeights[i]);
break;
}
case TALLY_BONUS_PRISON:
@ -347,7 +348,7 @@ void level_tally_t::Init(player_t *player)
if (displayEXP != UINT16_MAX)
{
laps = displayEXP;
totalLaps = 500;
totalLaps = 100;
}
}