From d7d0507d454e8df1e1f8c6f296bd7dde92d5e5c7 Mon Sep 17 00:00:00 2001 From: Ashnal Date: Sat, 26 Apr 2025 20:13:10 -0400 Subject: [PATCH] Update exp calcs to be out of 100 and adjust grading --- src/k_kart.c | 4 ++-- src/k_tally.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index c87111217..fc1b6a8f6 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -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)<exp)); // clamp between 0.5 and 1.25 + fixed_t targetdisplayexp = (100*player->gradingpointnum/numgradingpoints)<>FRACBITS; return displayexp; diff --git a/src/k_tally.cpp b/src/k_tally.cpp index 6c4489528..1cde311d5 100644 --- a/src/k_tally.cpp +++ b/src/k_tally.cpp @@ -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(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(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; } }