mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'pack-contest' into 'master'
NUMBERS NUMBERS NUMBERS overtake balance See merge request kart-krew-dev/ring-racers-internal!2789
This commit is contained in:
commit
c45ee76a2f
8 changed files with 39 additions and 12 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_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_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_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);
|
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");
|
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");
|
||||||
|
|
|
||||||
|
|
@ -3315,12 +3315,22 @@ static void K_drawKartEmeralds(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INT32 K_GetTransFlagFromFixed(fixed_t value)
|
INT32 K_GetTransFlagFromFixed(fixed_t value, boolean midrace)
|
||||||
{
|
{
|
||||||
value = std::clamp(value, FRACUNIT/2, FRACUNIT*3/2);
|
fixed_t base = midrace ? GRADINGFACTORSOFTCAP : FRACUNIT;
|
||||||
|
|
||||||
// Calculate distance from 1.0
|
value = std::clamp(value, base - FRACUNIT/2, base + FRACUNIT/2);
|
||||||
fixed_t distance = abs(FRACUNIT - value);
|
|
||||||
|
// Calculate distance from "base""
|
||||||
|
fixed_t distance = abs(base - value);
|
||||||
|
|
||||||
|
if (midrace)
|
||||||
|
{
|
||||||
|
if (value > base)
|
||||||
|
distance = FixedMul(distance, GRADINGFACTORCAPSTRENGTH);
|
||||||
|
}
|
||||||
|
|
||||||
|
distance = std::clamp(distance, 0, FRACUNIT/2);
|
||||||
|
|
||||||
// Map the distance to 0-10 range (10 = closest to 1.0, 0 = farthest from 1.0)
|
// Map the distance to 0-10 range (10 = closest to 1.0, 0 = farthest from 1.0)
|
||||||
INT32 transLevel = 10 - ((distance * 10) / (FRACUNIT/2));
|
INT32 transLevel = 10 - ((distance * 10) / (FRACUNIT/2));
|
||||||
|
|
@ -4090,6 +4100,13 @@ static boolean K_drawKartLaps(void)
|
||||||
|
|
||||||
UINT16 displayEXP = stplyr->karthud[khud_exp];
|
UINT16 displayEXP = stplyr->karthud[khud_exp];
|
||||||
|
|
||||||
|
// Odds debugger
|
||||||
|
if (cv_vorpal.value)
|
||||||
|
{
|
||||||
|
displayEXP = 100 * K_EffectiveGradingFactor(stplyr) / FRACUNIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Jesus Christ.
|
// Jesus Christ.
|
||||||
// I do not understand the way this system of offsets is laid out at all,
|
// 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.
|
// so it's probably going to be pretty bad to maintain. Sorry.
|
||||||
|
|
@ -4213,7 +4230,7 @@ static boolean K_drawKartLaps(void)
|
||||||
// WHAT IS THIS?
|
// WHAT IS THIS?
|
||||||
// WHAT ARE YOU FUCKING TALKING ABOUT?
|
// WHAT ARE YOU FUCKING TALKING ABOUT?
|
||||||
V_DrawMappedPatch(fr, fy, V_HUDTRANS|V_SLIDEIN|splitflags, kp_exp[1], R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_MUSTARD, GTC_CACHE));
|
V_DrawMappedPatch(fr, fy, V_HUDTRANS|V_SLIDEIN|splitflags, kp_exp[1], R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_MUSTARD, GTC_CACHE));
|
||||||
auto transflag = K_GetTransFlagFromFixed(K_EffectiveGradingFactor(stplyr));
|
auto transflag = K_GetTransFlagFromFixed(K_EffectiveGradingFactor(stplyr), true);
|
||||||
skincolornum_t overlaycolor = K_EffectiveGradingFactor(stplyr) < FRACUNIT ? SKINCOLOR_RUBY : SKINCOLOR_ULTRAMARINE ;
|
skincolornum_t overlaycolor = K_EffectiveGradingFactor(stplyr) < FRACUNIT ? SKINCOLOR_RUBY : SKINCOLOR_ULTRAMARINE ;
|
||||||
auto colormap = R_GetTranslationColormap(TC_RAINBOW, overlaycolor, GTC_CACHE);
|
auto colormap = R_GetTranslationColormap(TC_RAINBOW, overlaycolor, GTC_CACHE);
|
||||||
V_DrawMappedPatch(fr, fy, transflag|V_SLIDEIN|splitflags, kp_exp[1], colormap);
|
V_DrawMappedPatch(fr, fy, transflag|V_SLIDEIN|splitflags, kp_exp[1], colormap);
|
||||||
|
|
@ -4236,7 +4253,7 @@ static boolean K_drawKartLaps(void)
|
||||||
|
|
||||||
V_DrawMappedPatch(LAPS_X+bump, LAPS_Y, V_HUDTRANS|V_SLIDEIN|splitflags, kp_exp[0], R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_MUSTARD, GTC_CACHE));
|
V_DrawMappedPatch(LAPS_X+bump, LAPS_Y, V_HUDTRANS|V_SLIDEIN|splitflags, kp_exp[0], R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_MUSTARD, GTC_CACHE));
|
||||||
|
|
||||||
auto transflag = K_GetTransFlagFromFixed(K_EffectiveGradingFactor(stplyr));
|
auto transflag = K_GetTransFlagFromFixed(K_EffectiveGradingFactor(stplyr), true);
|
||||||
skincolornum_t overlaycolor = K_EffectiveGradingFactor(stplyr) < FRACUNIT ? SKINCOLOR_RUBY : SKINCOLOR_ULTRAMARINE ;
|
skincolornum_t overlaycolor = K_EffectiveGradingFactor(stplyr) < FRACUNIT ? SKINCOLOR_RUBY : SKINCOLOR_ULTRAMARINE ;
|
||||||
auto colormap = R_GetTranslationColormap(TC_RAINBOW, overlaycolor, GTC_CACHE);
|
auto colormap = R_GetTranslationColormap(TC_RAINBOW, overlaycolor, GTC_CACHE);
|
||||||
V_DrawMappedPatch(LAPS_X+bump, LAPS_Y, transflag|V_SLIDEIN|splitflags, kp_exp[0], colormap);
|
V_DrawMappedPatch(LAPS_X+bump, LAPS_Y, transflag|V_SLIDEIN|splitflags, kp_exp[0], colormap);
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ void K_drawButton(fixed_t x, fixed_t y, INT32 flags, patch_t *button[2], boolean
|
||||||
void K_drawButtonAnim(INT32 x, INT32 y, INT32 flags, patch_t *button[2], tic_t animtic);
|
void K_drawButtonAnim(INT32 x, INT32 y, INT32 flags, patch_t *button[2], tic_t animtic);
|
||||||
void K_DrawSticker(INT32 x, INT32 y, INT32 width, INT32 flags, boolean isSmall);
|
void K_DrawSticker(INT32 x, INT32 y, INT32 width, INT32 flags, boolean isSmall);
|
||||||
void K_DrawMarginSticker(INT32 x, INT32 y, INT32 width, INT32 flags, boolean isSmall, boolean leftedge);
|
void K_DrawMarginSticker(INT32 x, INT32 y, INT32 width, INT32 flags, boolean isSmall, boolean leftedge);
|
||||||
INT32 K_GetTransFlagFromFixed(fixed_t value);
|
INT32 K_GetTransFlagFromFixed(fixed_t value, boolean midrace);
|
||||||
|
|
||||||
void K_DrawKartPositionNumXY(
|
void K_DrawKartPositionNumXY(
|
||||||
UINT8 num,
|
UINT8 num,
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,13 @@ fixed_t K_EffectiveGradingFactor(const player_t *player)
|
||||||
fixed_t min = (franticitems) ? MINFRANTICFACTOR : MINGRADINGFACTOR;
|
fixed_t min = (franticitems) ? MINFRANTICFACTOR : MINGRADINGFACTOR;
|
||||||
if (grandprixinfo.gp && grandprixinfo.masterbots && !K_PlayerUsesBotMovement(player))
|
if (grandprixinfo.gp && grandprixinfo.masterbots && !K_PlayerUsesBotMovement(player))
|
||||||
return min;
|
return min;
|
||||||
return max(min, player->gradingfactor);
|
|
||||||
|
fixed_t gf = player->gradingfactor;
|
||||||
|
|
||||||
|
if (gf > GRADINGFACTORSOFTCAP)
|
||||||
|
gf = GRADINGFACTORSOFTCAP + FixedDiv(gf - GRADINGFACTORSOFTCAP, GRADINGFACTORCAPSTRENGTH);
|
||||||
|
|
||||||
|
return max(min, gf);
|
||||||
}
|
}
|
||||||
|
|
||||||
player_t *K_DuelOpponent(player_t *player)
|
player_t *K_DuelOpponent(player_t *player)
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,8 @@ player_t *K_DuelOpponent(player_t *player);
|
||||||
fixed_t K_EffectiveGradingFactor(const player_t *player);
|
fixed_t K_EffectiveGradingFactor(const player_t *player);
|
||||||
#define MINGRADINGFACTOR (FRACUNIT/2)
|
#define MINGRADINGFACTOR (FRACUNIT/2)
|
||||||
#define MINFRANTICFACTOR (8*FRACUNIT/10)
|
#define MINFRANTICFACTOR (8*FRACUNIT/10)
|
||||||
|
#define GRADINGFACTORSOFTCAP (FRACUNIT)
|
||||||
|
#define GRADINGFACTORCAPSTRENGTH (3*FRACUNIT)
|
||||||
|
|
||||||
void K_TimerReset(void);
|
void K_TimerReset(void);
|
||||||
void K_TimerInit(void);
|
void K_TimerInit(void);
|
||||||
|
|
|
||||||
|
|
@ -745,7 +745,7 @@ void podiumData_s::Draw(void)
|
||||||
factor = FRACUNIT - FixedDiv(factor, bluemaxoffset);
|
factor = FRACUNIT - FixedDiv(factor, bluemaxoffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto transflag = K_GetTransFlagFromFixed(factor);
|
auto transflag = K_GetTransFlagFromFixed(factor, false);
|
||||||
drawer_gametype
|
drawer_gametype
|
||||||
.xy(0, 1)
|
.xy(0, 1)
|
||||||
.colorize(static_cast<skincolornum_t>(overlaycolor))
|
.colorize(static_cast<skincolornum_t>(overlaycolor))
|
||||||
|
|
@ -915,7 +915,7 @@ void podiumData_s::Draw(void)
|
||||||
factor = FRACUNIT - FixedDiv(factor, bluemaxoffset);
|
factor = FRACUNIT - FixedDiv(factor, bluemaxoffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto transflag = K_GetTransFlagFromFixed(factor);
|
auto transflag = K_GetTransFlagFromFixed(factor, false);
|
||||||
drawer_totals_right
|
drawer_totals_right
|
||||||
.colorize(static_cast<skincolornum_t>(overlaycolor))
|
.colorize(static_cast<skincolornum_t>(overlaycolor))
|
||||||
.flags(transflag)
|
.flags(transflag)
|
||||||
|
|
|
||||||
|
|
@ -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
|
// 5: Skim any items that are much weaker than the reel's average out of the roulette
|
||||||
// 6: Cram it all in
|
// 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 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
|
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
|
// 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.
|
// without any players to use it on.
|
||||||
if (K_IsItemUselessAlone(bestitem))
|
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.
|
// Draw complex odds debugger. This one breaks down all the calcs in order.
|
||||||
if (cv_kartdebugdistribution.value > 1)
|
if (cv_kartdebugdistribution.value > 1)
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ extern consvar_t cv_debugfinishline;
|
||||||
extern consvar_t cv_drawinput;
|
extern consvar_t cv_drawinput;
|
||||||
extern consvar_t cv_drawtimer;
|
extern consvar_t cv_drawtimer;
|
||||||
extern consvar_t cv_debugfonts;
|
extern consvar_t cv_debugfonts;
|
||||||
|
extern consvar_t cv_vorpal;
|
||||||
|
|
||||||
// debugging
|
// debugging
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue