From 9cc6a3a4c0c8d4fa93fab315b31c1504cc32099a Mon Sep 17 00:00:00 2001 From: Natelytle Date: Wed, 2 Aug 2023 00:51:28 -0400 Subject: [PATCH] Switch to using deviation on notes and heads for multiplier scaling --- .../Difficulty/ManiaPerformanceAttributes.cs | 2 +- .../Difficulty/ManiaPerformanceCalculator.cs | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Difficulty/ManiaPerformanceAttributes.cs b/osu.Game.Rulesets.Mania/Difficulty/ManiaPerformanceAttributes.cs index 5a03336a4d..fb14100f04 100644 --- a/osu.Game.Rulesets.Mania/Difficulty/ManiaPerformanceAttributes.cs +++ b/osu.Game.Rulesets.Mania/Difficulty/ManiaPerformanceAttributes.cs @@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Mania.Difficulty public double? EstimatedUr { get; set; } [JsonProperty("hit_windows")] - public double[] HitWindows { get; set; } + public double[] HitWindows { get; set; } = null!; public override IEnumerable GetAttributesForDisplay() { diff --git a/osu.Game.Rulesets.Mania/Difficulty/ManiaPerformanceCalculator.cs b/osu.Game.Rulesets.Mania/Difficulty/ManiaPerformanceCalculator.cs index cf2aeed66c..d7b7ad7b03 100644 --- a/osu.Game.Rulesets.Mania/Difficulty/ManiaPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Mania/Difficulty/ManiaPerformanceCalculator.cs @@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Mania.Difficulty private int countMiss; private double? estimatedUr; private bool isLegacyScore; - private double[] hitWindows; + private double[] hitWindows = null!; public ManiaPerformanceCalculator() : base(new ManiaRuleset()) @@ -83,7 +83,15 @@ namespace osu.Game.Rulesets.Mania.Difficulty if (estimatedUr == null) return 0; - difficultyValue *= Math.Max(1 - Math.Pow(estimatedUr.Value / 500, 1.9), 0); // UR to multiplier curve, see https://www.desmos.com/calculator/w3zgyzqalm + double noteHeadPortion = (double)(attributes.NoteCount + attributes.HoldNoteCount) / (attributes.NoteCount + attributes.HoldNoteCount * 2); + double tailPortion = (double)attributes.HoldNoteCount / (attributes.NoteCount + attributes.HoldNoteCount * 2); + + // We increased the deviation of tails for estimation accuracy, but for difficulty scaling we actually + // only care about the deviation on notes and heads, as that's the "accuracy skill" of the player. + // Increasing the tail multiplier will decrease this value. + double noteHeadUr = estimatedUr.Value / Math.Sqrt(noteHeadPortion + tailPortion * Math.Pow(tail_deviation_multiplier, 2)); + + difficultyValue *= Math.Max(1 - Math.Pow(noteHeadUr / 500, 1.9), 0); return difficultyValue; }