1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 05:47:20 +08:00

balancing

This commit is contained in:
Givikap120 2024-04-04 18:36:58 +03:00
parent 23808be9b2
commit 2dbdd4f7d7
5 changed files with 31 additions and 27 deletions

View File

@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
{
private const double reading_window_size = 3000;
private const double overlap_multiplier = 1.8; //3.5
private const double overlap_multiplier = 1.8;
public static double EvaluateDensityOf(DifficultyHitObject current, bool applyDistanceNerf = true)
{
@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
double loopDifficulty = currObj.OpacityAt(loopObj.BaseObject.StartTime, false);
// Small distances means objects may be cheesed, so it doesn't matter whether they are arranged confusingly.
if (applyDistanceNerf) loopDifficulty *= (logistic((loopObj.MinimumJumpDistance - 60) / 10) + 0.2) / 1.2;
if (applyDistanceNerf) loopDifficulty *= (logistic((loopObj.MinimumJumpDistance - 80) / 10) + 0.2) / 1.2;
// Reduce density bonus for this object if they're too apart in time
// Nerf starts on 1500ms and reaches maximum (*=0) on 3000ms
@ -122,7 +122,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
// Bandaid to fix Rubik's Cube +EZ
double wideness = 0;
if (loopObj.Angle.Value > Math.PI * 0.5)
if (loopObj.Angle!.Value > Math.PI * 0.5)
{
// Goes from 0 to 1 as angle increasing from 90 degrees to 180
wideness = (loopObj.Angle.Value / Math.PI - 0.5) * 2;
@ -183,10 +183,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
}
overlapDifficulties.Add(lastOverlapness);
//screenOverlapDifficulty += lastOverlapness;
// This is a correct way to do this (paired with changing >= to <=), but somehow it get's more broken
// screenOverlapDifficulty = Math.Max(screenOverlapDifficulty, lastOverlapness);
}
const double decay_weight = 0.5;
@ -217,9 +213,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
{
double difficulty = ((OsuDifficultyHitObject)current).Density;
double overlapBonus = EvaluateOverlapDifficultyOf(current) * difficulty;
difficulty += overlapBonus * 0.1; // Overlaps should affect aiming part much less
return Math.Max(0, Math.Pow(difficulty, 1.5) - 1);
}
@ -353,8 +346,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
// The closer timeSpentInvisible is to 0 -> the less difference there are between NM and HD
// So we will reduce base according to this
// It will be 0.354 on AR11 value
double invisibilityFactor = logistic(currObj.Preempt / 160 - 4);
double invisibilityFactor = logistic(currObj.Preempt / 180 - 3.5);
double hdDifficulty = invisibilityFactor + densityFactor;

View File

@ -22,9 +22,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty
{
public class OsuDifficultyCalculator : DifficultyCalculator
{
public const double DIFFICULTY_MULTIPLIER = 0.067;
public const double DIFFICULTY_MULTIPLIER = 0.0668;
public const double SUM_POWER = 1.1;
public const double FL_SUM_POWER = 1.4;
public const double FL_SUM_POWER = 1.5;
public const double AR_SUM_POWER = 2.0;
public override int Version => 20220902;
public OsuDifficultyCalculator(IRulesetInfo ruleset, IWorkingBeatmap beatmap)
@ -73,7 +74,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
double baseReadingLowARPerformance = ReadingLowAR.DifficultyToPerformance(readingLowARRating);
double baseReadingHighARPerformance = OsuStrainSkill.DifficultyToPerformance(readingHighARRating) * 0.5; // WARNING, this is purely visual change to reduce SR inflation on high-end
double baseReadingARPerformance = Math.Max(baseReadingLowARPerformance, baseReadingHighARPerformance);
double baseReadingARPerformance = Math.Pow(Math.Pow(baseReadingLowARPerformance, AR_SUM_POWER) + Math.Pow(baseReadingHighARPerformance, AR_SUM_POWER), 1.0 / AR_SUM_POWER);
double baseFlashlightARPerformance = Math.Pow(Math.Pow(baseFlashlightPerformance, FL_SUM_POWER) + Math.Pow(baseReadingARPerformance, FL_SUM_POWER), 1.0 / FL_SUM_POWER);

View File

@ -82,12 +82,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty
flashlightValue = 0.0;
double lowARValue = computeReadingLowARValue(score, osuAttributes);
double readingHDValue = computeReadingHiddenValue(score, osuAttributes);
double highARValue = computeReadingHighARValue(score, osuAttributes);
// Take only max to reduce pp inflation
double readingARValue = Math.Max(lowARValue, highARValue);
double arPower = OsuDifficultyCalculator.AR_SUM_POWER;
double readingARValue = Math.Pow(Math.Pow(lowARValue, arPower) + Math.Pow(highARValue, arPower), 1.0 / arPower);
double readingHDValue = computeReadingHiddenValue(score, osuAttributes);
// Reduce AR reading bonus if FL is present
double flPower = OsuDifficultyCalculator.FL_SUM_POWER;
@ -390,7 +390,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
// Avoid it being broken on millions of pp, ruins it being continious, but it will never happen on normal circumstances
if (capPerformance > 10000 || cognitionPerformance > 10000) cognitionPerformance = Math.Min(capPerformance, cognitionPerformance);
else cognitionPerformance = 1000 * softmin(capPerformance / 1000, cognitionPerformance / 1000, 100);
else cognitionPerformance = 100 * softmin(capPerformance / 100, cognitionPerformance / 100, 100);
return cognitionPerformance;
}

View File

@ -75,11 +75,19 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
public double TravelTime { get; private set; }
/// <summary>
/// Angle the player has to take to hit this <see cref="OsuDifficultyHitObject"/>.
/// Absolute angle the player has to take to hit this <see cref="OsuDifficultyHitObject"/>.
/// Calculated as the angle between the circles (current-2, current-1, current).
/// Ranges from 0 to PI
/// </summary>
public double? Angle { get; private set; }
/// <summary>
/// Angle the player has to take to hit this <see cref="OsuDifficultyHitObject"/>.
/// Calculated as the angle between the circles (current-2, current-1, current).
/// Ranges from -PI to PI
/// </summary>
public double? AngleSigned { get; private set; }
/// <summary>
/// Retrieves the full hit window for a Great <see cref="HitResult"/>.
/// </summary>
@ -404,7 +412,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
float dot = Vector2.Dot(v1, v2);
float det = v1.X * v2.Y - v1.Y * v2.X;
Angle = Math.Abs(Math.Atan2(det, dot));
AngleSigned = Math.Atan2(det, dot);
Angle = Math.Abs((double)AngleSigned);
}
}

View File

@ -16,8 +16,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
public class ReadingLowAR : GraphSkill
{
private readonly List<double> difficulties = new List<double>();
private double skillMultiplier => 1.04;
private double aimComponentMultiplier => 0.7;
private double skillMultiplier => 1.25;
private double aimComponentMultiplier => 0.4;
public ReadingLowAR(Mod[] mods)
: base(mods)
@ -83,7 +83,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
return difficulty;
}
public static double DifficultyToPerformance(double difficulty) => difficulty < 1 ? difficulty * 6.0 : Math.Pow(difficulty, 4) * 6.0;
public static double DifficultyToPerformance(double difficulty) => Math.Max(
Math.Max(Math.Pow(difficulty, 1) * 13.0, Math.Pow(difficulty, 2) * 13.0),
Math.Max(Math.Pow(difficulty, 3) * 9.0, Math.Pow(difficulty, 4) * 6.0));
}
public class ReadingHidden : OsuStrainSkill
@ -94,7 +96,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
}
private double currentStrain;
private double skillMultiplier => 4.8;
private double skillMultiplier => 3.8;
protected override double CalculateInitialStrain(double time, DifficultyHitObject current) => currentStrain * StrainDecay(time - current.Previous(0).StartTime);
@ -112,6 +114,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
return currentStrain;
}
public new static double DifficultyToPerformance(double difficulty) => Math.Pow(difficulty, 2) * 25.0;
public new static double DifficultyToPerformance(double difficulty) => Math.Pow(difficulty, 1.8) * 28.0;
}
}