mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-29 18:37:58 +03:00
feat: always show score alg desc under profile alg desc (#1319)
* feat: always display score alg description * fix: typo
This commit is contained in:
@@ -51,17 +51,25 @@ export default function UGPTRatingsTable({ ugs }: { ugs: UserGameStats }) {
|
||||
tooltipContent={
|
||||
<div>
|
||||
{gptConfig.profileRatingAlgs[k].description}
|
||||
{k in gptConfig.scoreRatingAlgs && (
|
||||
{(gptConfig.profileRatingAlgs[k].associatedScoreAlgs ?? [])
|
||||
.length > 0 && (
|
||||
<>
|
||||
<Divider />(
|
||||
{FormatGPTScoreRatingName(
|
||||
ugs.game,
|
||||
ugs.playtype,
|
||||
k
|
||||
)}
|
||||
: {gptConfig.scoreRatingAlgs[k].description})
|
||||
<Divider />
|
||||
</>
|
||||
)}
|
||||
{gptConfig.profileRatingAlgs[k].associatedScoreAlgs?.map(
|
||||
(alg) => (
|
||||
<div>
|
||||
(
|
||||
{FormatGPTScoreRatingName(
|
||||
ugs.game,
|
||||
ugs.playtype,
|
||||
alg
|
||||
)}
|
||||
: {gptConfig.scoreRatingAlgs[alg].description})
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
wide
|
||||
|
||||
@@ -87,6 +87,7 @@ export const ARCAEA_TOUCH_CONF = {
|
||||
description:
|
||||
"The average of your best 30 potential values. This is different to in-game, as it does not take into account your recent scores in any way.",
|
||||
formatter: ToDecimalPlaces(2),
|
||||
associatedScoreAlgs: ["potential"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -311,6 +311,7 @@ export const BMS_7K_CONF = {
|
||||
sieglinde: {
|
||||
description: "The average of your best 20 sieglinde ratings.",
|
||||
formatter: FormatSieglindeBMS,
|
||||
associatedScoreAlgs: ["sieglinde"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ export const CHUNITHM_SINGLE_CONF = {
|
||||
naiveRating: {
|
||||
description: "The average of your best 50 ratings.",
|
||||
formatter: ToDecimalPlaces(2),
|
||||
associatedScoreAlgs: ["rating"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -161,6 +161,7 @@ export const DDR_SP_CONF = {
|
||||
description:
|
||||
"Flare Skill as it's implemented in DDR World, taking 30 best flare points from 3 different categories: CLASSIC (DDR 1st~X3 vs 2ndMIX), WHITE (DDR(2013)~DDR A), GOLD (DDR A20~WORLD).",
|
||||
formatter: FmtScoreNoCommas,
|
||||
associatedScoreAlgs: ["flareSkill"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ export const GITADORA_GITA_CONF = {
|
||||
naiveSkill: {
|
||||
description:
|
||||
"Your best 50 skill levels added together, regardless of whether the chart is HOT or not.",
|
||||
associatedScoreAlgs: ["skill"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -171,8 +171,11 @@ export const IIDX_SP_CONF = {
|
||||
},
|
||||
|
||||
profileRatingAlgs: {
|
||||
ktLampRating: { description: `An average of your best 20 ktLampRatings.` },
|
||||
BPI: { description: `An average of your best 20 BPIs.` },
|
||||
ktLampRating: {
|
||||
description: `An average of your best 20 ktLampRatings.`,
|
||||
associatedScoreAlgs: ["ktLampRating"],
|
||||
},
|
||||
BPI: { description: `An average of your best 20 BPIs.`, associatedScoreAlgs: ["BPI"] },
|
||||
},
|
||||
sessionRatingAlgs: {
|
||||
ktLampRating: { description: `An average of the best 10 ktLampRatings this session.` },
|
||||
|
||||
@@ -112,10 +112,12 @@ export const ITG_STAMINA_CONF = {
|
||||
highestBlock: {
|
||||
description: "The highest block level this player has cleared.",
|
||||
formatter: NoDecimalPlace,
|
||||
associatedScoreAlgs: ["blockRating"],
|
||||
},
|
||||
fastest32: {
|
||||
description: "The fastest BPM this user has streamed 32 unbroken measures at.",
|
||||
formatter: NoDecimalPlace,
|
||||
associatedScoreAlgs: ["fastest32"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -79,10 +79,12 @@ export const JUBEAT_SINGLE_CONF = {
|
||||
jubility: {
|
||||
description:
|
||||
"Your profile jubility. This takes your best 30 scores on PICK UP songs, and your best 30 elsewhere.",
|
||||
associatedScoreAlgs: ["jubility"],
|
||||
},
|
||||
naiveJubility: {
|
||||
description:
|
||||
"A naive version of jubility which just adds together your best 60 scores.",
|
||||
associatedScoreAlgs: ["jubility"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@ export const MAIMAI_DX_SINGLE_CONF = {
|
||||
naiveRate: {
|
||||
description: "A naive rating algorithm that just sums your 50 best scores.",
|
||||
formatter: NoDecimalPlace,
|
||||
associatedScoreAlgs: ["rate"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ export const MAIMAI_SINGLE_CONF = {
|
||||
description:
|
||||
"An average of your 30 best ratings. This is different from the rating in-game, as that is song-based and takes into account recent scores.",
|
||||
formatter: ToDecimalPlaces(2),
|
||||
associatedScoreAlgs: ["rate"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ export const MUSECA_SINGLE_CONF = {
|
||||
description:
|
||||
"The sum of your best 20 Curator Skills. This is identical to how it's calculated in-game.",
|
||||
formatter: NoDecimalPlace,
|
||||
associatedScoreAlgs: ["curatorSkill"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -133,18 +133,15 @@ export const ONGEKI_SINGLE_CONF = {
|
||||
|
||||
scoreRatingAlgs: {
|
||||
rating: {
|
||||
description:
|
||||
"A rating value of this score, capping at +2.0 at SSS+. This is identical to the system used in bright MEMORY and earlier versions.",
|
||||
description: "Technical Score-based rating as it's implemented in bright MEMORY.",
|
||||
formatter: ToDecimalPlaces(2),
|
||||
},
|
||||
scoreRating: {
|
||||
description:
|
||||
"A rating value of this score, capping at +2.7 at 1,010,000. This is identical to the system used in Re:Fresh.",
|
||||
description: "Technical Score-based rating as it's implemented in Re:Fresh.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
},
|
||||
starRating: {
|
||||
description:
|
||||
"A rating value of this score, based on stars derived from Platinum Score. This is identical to the system used in Re:Fresh.",
|
||||
description: "Platinum Stars-based rating as it's implemented in Re:Fresh.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
},
|
||||
},
|
||||
@@ -165,13 +162,15 @@ export const ONGEKI_SINGLE_CONF = {
|
||||
profileRatingAlgs: {
|
||||
naiveRating: {
|
||||
description:
|
||||
"The average of your best 45 classic ratings. This is a simpler variant of the rating algorithm used in bright MEMORY and earlier versions, without distinguishing between new and old charts, and without taking recent scores into account.",
|
||||
"The average of your best 45 ClassicRatings. This is a simpler variant of the rating algorithm used in bright MEMORY and earlier versions, without distinguishing between new and old charts, and without taking recent scores into account.",
|
||||
formatter: ToDecimalPlaces(2),
|
||||
associatedScoreAlgs: ["rating"],
|
||||
},
|
||||
naiveRatingRefresh: {
|
||||
description:
|
||||
"A weighted sum of the average of your best 60 score ratings, and your best 50 star ratings. This is a simpler variant of the rating algorithm used in Re:Fresh, without distinguishing between new and old charts.",
|
||||
"A weighted sum of the average of your best 60 ScoreRatings, and your best 50 StarRatings. This is a simpler variant of the rating algorithm used in Re:Fresh, without distinguishing between new and old charts.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
associatedScoreAlgs: ["scoreRating", "starRating"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ export const PMS_CONTROLLER_CONF = {
|
||||
sieglinde: {
|
||||
description: "The average of your best 20 sieglinde ratings.",
|
||||
formatter: FormatSieglindePMS,
|
||||
associatedScoreAlgs: ["sieglinde"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@ export const POPN_9B_CONF = {
|
||||
naiveClassPoints: {
|
||||
description:
|
||||
"A naive average of your best 20 scores. This is different to in game class points, as that is affected by recent scores, and not just your best scores.",
|
||||
associatedScoreAlgs: ["classPoints"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ export const SDVX_SINGLE_CONF = {
|
||||
VF6: {
|
||||
description: "Your best 50 VF6 values added together.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
associatedScoreAlgs: ["VF6"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ export const USC_CONTROLLER_CONF = {
|
||||
VF6: {
|
||||
description: "Your best 50 VF6 values added together.",
|
||||
formatter: ToDecimalPlaces(3),
|
||||
associatedScoreAlgs: ["VF6"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ export const WACCA_SINGLE_CONF = {
|
||||
profileRatingAlgs: {
|
||||
naiveRate: {
|
||||
description: "A naive rating algorithm that just sums your 50 best scores.",
|
||||
associatedScoreAlgs: ["rate"],
|
||||
},
|
||||
},
|
||||
sessionRatingAlgs: {
|
||||
|
||||
@@ -15,6 +15,14 @@ export interface RatingAlgorithmConfig {
|
||||
formatter?: (value: number) => string;
|
||||
}
|
||||
|
||||
export interface ProfileRatingAlgorithmConfig extends RatingAlgorithmConfig {
|
||||
/**
|
||||
* Which score rating algorithms should be mentioned in the footnote
|
||||
* of this algorithm's description?
|
||||
*/
|
||||
associatedScoreAlgs: ReadonlyArray<string>;
|
||||
}
|
||||
|
||||
export interface ClassInfo<ClassID extends string> {
|
||||
display: string;
|
||||
id: ClassID;
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { MatchTypes } from "./batch-manual";
|
||||
import type {
|
||||
ExtractClassValues,
|
||||
FixedDifficulties,
|
||||
ProfileRatingAlgorithmConfig,
|
||||
RatingAlgorithmConfig,
|
||||
} from "./game-config-utils";
|
||||
import type { INTERNAL_GAME_PT_CONFIG } from "./internals";
|
||||
@@ -332,7 +333,7 @@ export interface SpecificGamePTConfig<GPT extends GPTString> {
|
||||
* server config. By defining them here, the typesystem will enforce that you
|
||||
* implement them elsewhere.
|
||||
*/
|
||||
profileRatingAlgs: Record<ProfileRatingAlgorithms[GPT], RatingAlgorithmConfig>;
|
||||
profileRatingAlgs: Record<ProfileRatingAlgorithms[GPT], ProfileRatingAlgorithmConfig>;
|
||||
|
||||
/**
|
||||
* What classes may a profile have attached onto it for this GPT?
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import type { MatchTypes } from "./batch-manual";
|
||||
import type { ClassConfig, DifficultyConfig, RatingAlgorithmConfig } from "./game-config-utils";
|
||||
import type {
|
||||
ClassConfig,
|
||||
DifficultyConfig,
|
||||
ProfileRatingAlgorithmConfig,
|
||||
RatingAlgorithmConfig,
|
||||
} from "./game-config-utils";
|
||||
import type { ConfScoreMetric } from "./metrics";
|
||||
import type { AnyZodObject } from "zod";
|
||||
|
||||
@@ -39,7 +44,7 @@ export type INTERNAL_GAME_PT_CONFIG = Readonly<{
|
||||
|
||||
scoreRatingAlgs: Record<string, RatingAlgorithmConfig>;
|
||||
sessionRatingAlgs: Record<string, RatingAlgorithmConfig>;
|
||||
profileRatingAlgs: Record<string, RatingAlgorithmConfig>;
|
||||
profileRatingAlgs: Record<string, ProfileRatingAlgorithmConfig>;
|
||||
|
||||
defaultScoreRatingAlg: string;
|
||||
defaultSessionRatingAlg: string;
|
||||
|
||||
Reference in New Issue
Block a user