From 168ba625006f86ca7fd758adcec2e24af1169f40 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 8 Dec 2020 22:09:48 +0900 Subject: [PATCH 01/10] Port StanR's dynamic SO pp changes --- osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs | 1 + osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs | 2 ++ osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs index fff033357d..e8ac60bc5e 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs @@ -12,5 +12,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty public double ApproachRate; public double OverallDifficulty; public int HitCircleCount; + public int SpinnerCount; } } diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs index 6027635b75..6a7d76151c 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs @@ -48,6 +48,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty maxCombo += beatmap.HitObjects.OfType().Sum(s => s.NestedHitObjects.Count - 1); int hitCirclesCount = beatmap.HitObjects.Count(h => h is HitCircle); + int spinnerCount = beatmap.HitObjects.Count(h => h is Spinner); return new OsuDifficultyAttributes { @@ -59,6 +60,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty OverallDifficulty = (80 - hitWindowGreat) / 6, MaxCombo = maxCombo, HitCircleCount = hitCirclesCount, + SpinnerCount = spinnerCount, Skills = skills }; } diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index 0ebe0ddc2d..030b0cf6d1 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty multiplier *= 0.90; if (mods.Any(m => m is OsuModSpunOut)) - multiplier *= 0.95; + multiplier *= 1.0 - Math.Pow((double)Attributes.SpinnerCount / totalHits, 0.85); double aimValue = computeAimValue(); double speedValue = computeSpeedValue(); From 748035e80a4550305cc2b294c2ced3d254829c6e Mon Sep 17 00:00:00 2001 From: Xexxar Date: Tue, 8 Dec 2020 16:53:52 -0600 Subject: [PATCH 02/10] changes to acc scaling curve for speed and aim pp --- .../Difficulty/OsuPerformanceCalculator.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index 0ebe0ddc2d..f239289d7f 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -121,10 +121,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty : 0.0); } - // Scale the aim value with accuracy _slightly_ - aimValue *= 0.5 + accuracy / 2.0; - // It is important to also consider accuracy difficulty when doing that - aimValue *= 0.98 + Math.Pow(Attributes.OverallDifficulty, 2) / 2500; + // Scale the speed value with accuracy _alot_ + if (accuracy > .8) + aimValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; + else + aimValue *= accuracy * (.5 / .8); return aimValue; } @@ -154,8 +155,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty if (mods.Any(m => m is OsuModHidden)) speedValue *= 1.0 + 0.04 * (12.0 - Attributes.ApproachRate); - // Scale the speed value with accuracy _slightly_ - speedValue *= 0.02 + accuracy; + // Scale the speed value with accuracy _alot_ + if (accuracy > .8) + speedValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; + else + speedValue *= accuracy * (.5 / .8); // It is important to also consider accuracy difficulty when doing that speedValue *= 0.96 + Math.Pow(Attributes.OverallDifficulty, 2) / 1600; From 7e3fcfe43721ef34a2619084a9007f67de79ad92 Mon Sep 17 00:00:00 2001 From: Xexxar Date: Wed, 9 Dec 2020 10:35:48 -0600 Subject: [PATCH 03/10] fixed issue with comment --- osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index f239289d7f..c35b739f81 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -121,7 +121,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty : 0.0); } - // Scale the speed value with accuracy _alot_ + // Scale the aim value with accuracy _alot_ if (accuracy > .8) aimValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; else From cfc34a63bd478b914ebf98f47eef25a08879c3d6 Mon Sep 17 00:00:00 2001 From: Xexxar Date: Wed, 9 Dec 2020 11:21:03 -0600 Subject: [PATCH 04/10] realized i accidently deleted the OD scaling --- osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index c35b739f81..306c491210 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -126,6 +126,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty aimValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; else aimValue *= accuracy * (.5 / .8); + // It is important to also consider accuracy difficulty when doing that + aimValue *= 0.975 + Math.Pow(Attributes.OverallDifficulty, 2) / 2000; return aimValue; } @@ -161,7 +163,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty else speedValue *= accuracy * (.5 / .8); // It is important to also consider accuracy difficulty when doing that - speedValue *= 0.96 + Math.Pow(Attributes.OverallDifficulty, 2) / 1600; + speedValue *= 0.95 + Math.Pow(Attributes.OverallDifficulty, 2) / 1000; return speedValue; } From 146e6a61935bb71a7dec3dac37b1c4791c88a061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Wed, 9 Dec 2020 18:30:52 +0100 Subject: [PATCH 05/10] Fix formatting issues --- .../Difficulty/OsuPerformanceCalculator.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index 306c491210..0306ef3ca0 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -123,9 +123,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty // Scale the aim value with accuracy _alot_ if (accuracy > .8) - aimValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; + aimValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; else - aimValue *= accuracy * (.5 / .8); + aimValue *= accuracy * (.5 / .8); // It is important to also consider accuracy difficulty when doing that aimValue *= 0.975 + Math.Pow(Attributes.OverallDifficulty, 2) / 2000; @@ -159,9 +159,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty // Scale the speed value with accuracy _alot_ if (accuracy > .8) - speedValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; + speedValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; else - speedValue *= accuracy * (.5 / .8); + speedValue *= accuracy * (.5 / .8); // It is important to also consider accuracy difficulty when doing that speedValue *= 0.95 + Math.Pow(Attributes.OverallDifficulty, 2) / 1000; From 051afe5a7a6838b40be5cea60d2d8d0af777ef43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Wed, 9 Dec 2020 18:31:51 +0100 Subject: [PATCH 06/10] Fix typos in comments --- osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index 0306ef3ca0..477028b02b 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -121,7 +121,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty : 0.0); } - // Scale the aim value with accuracy _alot_ + // Scale the aim value with accuracy _a lot_ if (accuracy > .8) aimValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; else @@ -157,7 +157,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty if (mods.Any(m => m is OsuModHidden)) speedValue *= 1.0 + 0.04 * (12.0 - Attributes.ApproachRate); - // Scale the speed value with accuracy _alot_ + // Scale the speed value with accuracy _a lot_ if (accuracy > .8) speedValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; else From 05ad9aae8d221e0caf59ce282771d6996fb50abb Mon Sep 17 00:00:00 2001 From: Xexxar Date: Wed, 9 Dec 2020 11:57:01 -0600 Subject: [PATCH 07/10] changed curve to linear OD + acc based curve --- .../Difficulty/OsuPerformanceCalculator.cs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index 306c491210..87a6fbb23a 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -121,13 +121,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty : 0.0); } - // Scale the aim value with accuracy _alot_ - if (accuracy > .8) - aimValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; - else - aimValue *= accuracy * (.5 / .8); - // It is important to also consider accuracy difficulty when doing that - aimValue *= 0.975 + Math.Pow(Attributes.OverallDifficulty, 2) / 2000; + // Scale the aim value with accuracy and OD + aimValue *= .975 + Math.Pow(Attributes.OverallDifficulty, 2) / 1500 + 200 * (accuracy - 1) * Math.Pow(1 / Attributes.OverallDifficulty, 2); return aimValue; } @@ -157,13 +152,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty if (mods.Any(m => m is OsuModHidden)) speedValue *= 1.0 + 0.04 * (12.0 - Attributes.ApproachRate); - // Scale the speed value with accuracy _alot_ - if (accuracy > .8) - speedValue *= 0.5 + Math.Pow(Math.Sin(2.5 * (accuracy - .8) * Math.PI), 2) / 2; - else - speedValue *= accuracy * (.5 / .8); - // It is important to also consider accuracy difficulty when doing that - speedValue *= 0.95 + Math.Pow(Attributes.OverallDifficulty, 2) / 1000; + // Scale the speed value with accuracy and OD + speedValue *= .95 + Math.Pow(Attributes.OverallDifficulty, 2) / 750 + 200 * (accuracy - 1) * Math.Pow(1 / Attributes.OverallDifficulty, 2); return speedValue; } From d604c51cbd50ef2b72e831d23937373df55b6a0f Mon Sep 17 00:00:00 2001 From: Xexxar Date: Wed, 9 Dec 2020 13:04:14 -0600 Subject: [PATCH 08/10] capped scaling at OD 8 to prevent overscaling --- osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index 87a6fbb23a..fce17071e4 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -122,7 +122,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty } // Scale the aim value with accuracy and OD - aimValue *= .975 + Math.Pow(Attributes.OverallDifficulty, 2) / 1500 + 200 * (accuracy - 1) * Math.Pow(1 / Attributes.OverallDifficulty, 2); + aimValue *= Math.Max(0, .975 + Math.Pow(Attributes.OverallDifficulty, 2) / 1500 + 200 * (accuracy - 1) * Math.Pow(1 / Math.Max(8, Attributes.OverallDifficulty), 2)); return aimValue; } @@ -153,7 +153,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty speedValue *= 1.0 + 0.04 * (12.0 - Attributes.ApproachRate); // Scale the speed value with accuracy and OD - speedValue *= .95 + Math.Pow(Attributes.OverallDifficulty, 2) / 750 + 200 * (accuracy - 1) * Math.Pow(1 / Attributes.OverallDifficulty, 2); + speedValue *= Math.Max(0, .95 + Math.Pow(Attributes.OverallDifficulty, 2) / 750 + 200 * (accuracy - 1) * Math.Pow(1 / Math.Max(8, Attributes.OverallDifficulty), 2)); return speedValue; } From 54abc3bd4dd121fab5986b4a6c0f35bec5e0c037 Mon Sep 17 00:00:00 2001 From: Xexxar Date: Wed, 9 Dec 2020 20:07:52 -0600 Subject: [PATCH 09/10] revert aim curve and add new 50s nerf --- .../Difficulty/OsuPerformanceCalculator.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index ddb5cb506d..2b9c817094 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -121,9 +121,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty : 0.0); } - // Scale the aim value with accuracy and OD - aimValue *= Math.Max(0, .975 + Math.Pow(Attributes.OverallDifficulty, 2) / 1500 + 200 * (accuracy - 1) * Math.Pow(1 / Math.Max(8, Attributes.OverallDifficulty), 2)); - + // Scale the aim value with accuracy _slightly_ + aimValue *= 0.5 + accuracy / 2.0; + // It is important to also consider accuracy difficulty when doing that + aimValue *= 0.98 + Math.Pow(Attributes.OverallDifficulty, 2) / 2500; + return aimValue; } @@ -153,7 +155,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty speedValue *= 1.0 + 0.04 * (12.0 - Attributes.ApproachRate); // Scale the speed value with accuracy and OD - speedValue *= Math.Max(0, .95 + Math.Pow(Attributes.OverallDifficulty, 2) / 750 + 200 * (accuracy - 1) * Math.Pow(1 / Math.Max(8, Attributes.OverallDifficulty), 2)); + speedValue *= (.95 + Math.Pow(Attributes.OverallDifficulty, 2) / 750) * Math.Pow(accuracy, (14.5 - Math.Max(Attributes.OverallDifficulty, 8)) / 2); + // Scale the speed value with # of 50s to punish doubletapping. + speedValue *= Math.Pow(0.98, countMeh < totalHits / 500.0 ? 0.5 * countMeh : countMeh - totalHits / 500.0 * 0.5); return speedValue; } From cc5639d2b42cfd9b05272fb659a72c879cd1e3c5 Mon Sep 17 00:00:00 2001 From: Xexxar Date: Thu, 10 Dec 2020 09:48:40 -0600 Subject: [PATCH 10/10] added unneeded whitespace --- osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index 2b9c817094..5a827eef96 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -125,7 +125,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty aimValue *= 0.5 + accuracy / 2.0; // It is important to also consider accuracy difficulty when doing that aimValue *= 0.98 + Math.Pow(Attributes.OverallDifficulty, 2) / 2500; - + return aimValue; }