mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Soft-cap positive EXP, tune down large games, loneliness more responsive
This commit is contained in:
parent
50a90d9741
commit
dfb34ad722
5 changed files with 20 additions and 3 deletions
|
|
@ -919,6 +919,7 @@ consvar_t cv_devmode_screen = PlayerCheat("devmode_screen", "1").min_max(1, 4).d
|
|||
consvar_t cv_drawpickups = PlayerCheat("drawpickups", "Yes").yes_no().description("Hide rings, spheres, item capsules, prison capsules (visual only)");
|
||||
consvar_t cv_drawtimer = PlayerCheat("drawtimer", "No").yes_no().description("Always draw the timer (race checkpoint timing, etc)");
|
||||
consvar_t cv_debugfonts = PlayerCheat("debugfonts", "No").yes_no().description("Draw font bounding boxes (integer precision, beware centered text!)");
|
||||
consvar_t cv_vorpal = ServerCheat("vorpal", "No").yes_no().description("Show real EXP odds modification");
|
||||
|
||||
void lua_profile_OnChange(void);
|
||||
consvar_t cv_lua_profile = PlayerCheat("lua_profile", "0").values(CV_Unsigned).onchange(lua_profile_OnChange).description("Show hook timings over an average of N tics");
|
||||
|
|
|
|||
|
|
@ -4090,6 +4090,13 @@ static boolean K_drawKartLaps(void)
|
|||
|
||||
UINT16 displayEXP = stplyr->karthud[khud_exp];
|
||||
|
||||
// Odds debugger
|
||||
if (cv_vorpal.value)
|
||||
{
|
||||
displayEXP = 100 * K_EffectiveGradingFactor(stplyr) / FRACUNIT;
|
||||
}
|
||||
|
||||
|
||||
// Jesus Christ.
|
||||
// I do not understand the way this system of offsets is laid out at all,
|
||||
// so it's probably going to be pretty bad to maintain. Sorry.
|
||||
|
|
|
|||
10
src/k_kart.c
10
src/k_kart.c
|
|
@ -151,7 +151,15 @@ fixed_t K_EffectiveGradingFactor(const player_t *player)
|
|||
fixed_t min = (franticitems) ? MINFRANTICFACTOR : MINGRADINGFACTOR;
|
||||
if (grandprixinfo.gp && grandprixinfo.masterbots && !K_PlayerUsesBotMovement(player))
|
||||
return min;
|
||||
return max(min, player->gradingfactor);
|
||||
|
||||
fixed_t gf = player->gradingfactor;
|
||||
fixed_t SOFT_CAP = FRACUNIT;
|
||||
fixed_t SOFT_CAP_FACTOR = 3*FRACUNIT;
|
||||
|
||||
if (gf > SOFT_CAP)
|
||||
gf = SOFT_CAP + FixedDiv(gf - SOFT_CAP, SOFT_CAP_FACTOR);
|
||||
|
||||
return max(min, gf);
|
||||
}
|
||||
|
||||
player_t *K_DuelOpponent(player_t *player)
|
||||
|
|
|
|||
|
|
@ -1426,7 +1426,7 @@ void K_FillItemRouletteData(player_t *player, itemroulette_t *const roulette, bo
|
|||
// 5: Skim any items that are much weaker than the reel's average out of the roulette
|
||||
// 6: Cram it all in
|
||||
|
||||
fixed_t largegamescaler = roulette->playing * 6 + 100; // Spread out item odds in large games for a less insane experience.
|
||||
fixed_t largegamescaler = roulette->playing * 10 + 100; // Spread out item odds in large games for a less insane experience.
|
||||
UINT32 targetpower = 100 * roulette->dist / largegamescaler; // fill roulette with items around this value!
|
||||
|
||||
UINT32 powers[NUMKARTRESULTS]; // how strong is each item? think of this as a "target distance" for this item to spawn at
|
||||
|
|
@ -1642,7 +1642,7 @@ void K_FillItemRouletteData(player_t *player, itemroulette_t *const roulette, bo
|
|||
// Conversely, if we're lonely, try not to reselect an item that wouldn't be useful to us
|
||||
// without any players to use it on.
|
||||
if (K_IsItemUselessAlone(bestitem))
|
||||
deltapenalty = Easing_InCubic(loneliness, deltapenalty, 3*deltapenalty);
|
||||
deltapenalty = Easing_Linear(loneliness, deltapenalty, 5*deltapenalty);
|
||||
|
||||
// Draw complex odds debugger. This one breaks down all the calcs in order.
|
||||
if (cv_kartdebugdistribution.value > 1)
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ extern consvar_t cv_debugfinishline;
|
|||
extern consvar_t cv_drawinput;
|
||||
extern consvar_t cv_drawtimer;
|
||||
extern consvar_t cv_debugfonts;
|
||||
extern consvar_t cv_vorpal;
|
||||
|
||||
// debugging
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue