-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the highscore importer provide the MaximumStatistics
dictionary
#76
Conversation
I've bundled the LegacyTotalScore migration here since it's kinda related to everything anyway. |
@@ -284,14 +284,15 @@ public async Task Run(HighScore[] scores) | |||
BeatmapID = highScore.beatmap_id, | |||
RulesetID = ruleset.RulesetInfo.OnlineID, | |||
Passed = true, | |||
TotalScore = highScore.score, | |||
TotalScore = (int)referenceScore.TotalScore, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scary cast
I'm very concerned about the performance implications of these changes (+1RTT per score, taking the count up from zero). Will do a test run tonight and see how things go. No need to make changes just yet, but I'm pretty sure we'll want to fetch every combo for every beatmap before running. |
ScoreProcessor scoreProcessor = ruleset.CreateScoreProcessor(); | ||
int baseScore = scoreInfo.Statistics.Where(kvp => kvp.Key.AffectsAccuracy()).Sum(kvp => kvp.Value * Judgement.ToNumericResult(kvp.Key)); | ||
int maxBaseScore = scoreInfo.MaximumStatistics.Where(kvp => kvp.Key.AffectsAccuracy()).Sum(kvp => kvp.Value * Judgement.ToNumericResult(kvp.Key)); | ||
|
||
scoreInfo.TotalScore = (int)scoreProcessor.ComputeScore(ScoringMode.Standardised, scoreInfo); | ||
scoreInfo.Accuracy = maxBaseScore == 0 ? 1 : baseScore / (double)maxBaseScore; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very likely to be missing something here, but does this apply to legacy/stable scores? And if so, wouldn't the accuracy change here because slider ticks/ends are not present in the statistics? This is with the assumption that slider ticks/ends affect accuracy in stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this apply to legacy/stable scores?
This entire thing applies only to legacy/stable scores.
wouldn't the accuracy change
Yes, the accuracy does change. However it's not exactly how you think of it. Slider ticks/ends do not affect accuracy in stable, and the values computed by both osu!stable and osu!web are derived solely from the statistics available in scores.
Notably, slider ticks/ends are not stored to scores.
Some cases do differ, such as mania, where in stable/web GREATs/PERFECTs are treated as the same value, but in lazer they're not. For taiko, stable uses 300/150 whereas lazer uses 300/100.
This information is recoverable, because, as I said, it's done in real time from score statistics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, thanks for the clarification.
Prereqs:
The purpose of this PR is to add the
MaximumStatistics
dictionary to imported scores.ok
result, the accurate version isgreat
in osu/taiko/catch andperfect
in mania. This is done viaRuleset.GetHitResults()
as mentioned at in my original PR.osu_beatmap_difficulty_attributes
table (attrib_id = 9
), and add alegacy_combo_increase
hit result to bring them up to the same level if they don't match. This only shows up for osu/mania - taiko/catch have accurate combo counts from score statistics alone.I have checked that combo count is accurate for osu, however mania combo is a few combo off because osu!stable is silly and allows players to get more maximum combo than should actually be possible via hold notes. I'm unsure how to deal with this yet - but I gather we can do a separate pass over it later on.
Additionally, this PR migrates total score into
LegacyTotalScore
.Sample files:
osu.txt
taiko.txt
catch.txt
mania.txt
Imported from the top-1000 dumps on https://data.ppy.sh