Skip to content

Conversation

@tsunyoku
Copy link
Member

@tsunyoku tsunyoku commented Dec 30, 2024

RFC.

Moves all PP calculation bonuses that don't require score information into star rating for the osu! ruleset. Star rating and PP intentionally have a direct relationship with eachother, and this is enriching that. This won't make any real difference to PP values (only caused by math related operations), but this will allow for star rating to have a tighter relation to PP by including difficulty-related factors such as AR bonus. Length bonus is intentionally excluded from this for now until it's more intelligent.

For now, non-legacy mods such as Blinds and Traceable still have their bonuses inside of PP until realtime difficulty calculations allow for those to be moved too. Blinds needs further attention as lack of realtime means it's essentially getting 2 bonuses at once. I will address this in separate PR.

I think this makes the most sense given these bonuses exist to award for being difficult independently of the individual score which is exactly what difficulty calculation/star rating is for.

Star rating is slightly downscaled (a new constant is created as a result) to factor for most maps gaining a lot of SR on average by the various bonuses.

Future improvements:

  • Move TC bonuses into difficulty when realtime exists
  • Add a special case for BL & HD to difficulty when realtime exists

@Givikap120
Copy link
Contributor

I agree with everything but length bonus
Star Rating is important to determine playability of the map regardless of length

@peppy peppy deleted the branch ppy:pp-dev February 26, 2025 16:18
@peppy peppy closed this Feb 26, 2025
@tsunyoku tsunyoku reopened this Feb 26, 2025
@tsunyoku
Copy link
Member Author

!diffcalc
RULESET=osu
OSU_A=https://github.com/ppy/osu/tree/pp-dev
OSU_B=#31351

@ppy ppy deleted a comment from github-actions bot Feb 27, 2025
@github-actions
Copy link

@tsunyoku
Copy link
Member Author

!diffcalc
RULESET=osu
OSU_A=https://github.com/ppy/osu/tree/pp-dev
OSU_B=#31351

@github-actions
Copy link

@tsunyoku
Copy link
Member Author

tsunyoku commented Mar 1, 2025

@github-actions
Copy link

github-actions bot commented Mar 1, 2025

@tsunyoku
Copy link
Member Author

tsunyoku commented Mar 2, 2025

@github-actions
Copy link

@tsunyoku
Copy link
Member Author

@github-actions
Copy link

@stanriders
Copy link
Member

@github-actions
Copy link

Copy link
Member

@stanriders stanriders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests nvm i forgot we fix tests when merging to master

@stanriders stanriders moved this from Pending Review to Pending Merge in Difficulty calculation changes Apr 27, 2025
@tsunyoku tsunyoku merged commit 2aeb80a into ppy:pp-dev Apr 27, 2025
4 of 9 checks passed
@github-project-automation github-project-automation bot moved this from Pending Merge to Pending Deploy in Difficulty calculation changes Apr 27, 2025
Givikap120 pushed a commit to Givikap120/osu that referenced this pull request May 8, 2025
* basis refactor to allow for more complex SR calculations

* move all possible bonuses into star rating

* decrease star rating scaling to account for overall gains

* add extra FL guard for safety

* move star rating multiplier into a constant

* Reorganise some things

* Add HD and SO to difficulty adjustment mods

* Move non-legacy mod multipliers back to PP

* Some merge fixes

* Fix application of flashlight rating multiplier

* Fix Hidden bonuses being applied when Blinds mod is in use

* Move part of speed OD scaling into difficulty

* Move length bonus back to PP

* Remove blinds special case

* Revert star rating multiplier decrease

* More balancing

---------

Co-authored-by: StanR <[email protected]>
stanriders added a commit that referenced this pull request May 16, 2025
…he same time (#33066)

* implement stuff

* fix basic issues

* rework calculations

* sanity check

* don't use score based misscount if no scorev1 present

* Update OsuPerformanceCalculator.cs

* update misscount diff attribute names

* add raw score misscount attribute

* introduce more reasonable high bound for misscount

* code quality changes

* Fix osu!catch SR buzz slider detection (#32412)

* Use `normalized_hitobject_radius` during osu!catch buzz slider detection

Currently the algorithm considers some buzz sliders as standstills when
in reality they require movement. This happens because `HalfCatcherWidth`
isn't normalized while `exactDistanceMoved` is, leading to an inaccurate
comparison.

`normalized_hitobject_radius` is the normalized value of `HalfCatcherWidth`
and replacing one with the other fixes the problem.

* Rename `normalized_hitobject_radius` to `normalized_half_catcher_width`

The current name is confusing because hit objects have no radius in the
context of osu!catch difficulty calculation. The new name conveys the
actual purpose of the value.

* Only set `normalized_half_catcher_width` in `CatchDifficultyHitObject`

Prevents potential bugs if the value were to be changed in one of the
classes but not in both.

* Use `CatchDifficultyHitObject.NORMALIZED_HALF_CATCHER_WIDTH` directly

Requested during code review.

---------

Co-authored-by: James Wilson <[email protected]>

* Move osu!catch movement diffcalc to an evaluator (#32655)

* Move osu!catch movement state into `CatchDifficultyHitObject`

In order to port `Movement` to an evaluator, the state has to be either
moved elsewhere or calculated inside the evaluator. The latter requires
backtracking for every hit object, which in the worst case is continued
until the beginning of the map is reached. Limiting backtracking can
lead to difficulty value changes.

Thus, the first option was chosen for its simplicity.

* Move osu!catch movement difficulty calculation to an evaluator

Makes the code more in line with the other game modes.

* Add documentation for `CatchDifficultyHitObject` fields

---------

Co-authored-by: James Wilson <[email protected]>

* Move all score-independent bonuses into star rating (#31351)

* basis refactor to allow for more complex SR calculations

* move all possible bonuses into star rating

* decrease star rating scaling to account for overall gains

* add extra FL guard for safety

* move star rating multiplier into a constant

* Reorganise some things

* Add HD and SO to difficulty adjustment mods

* Move non-legacy mod multipliers back to PP

* Some merge fixes

* Fix application of flashlight rating multiplier

* Fix Hidden bonuses being applied when Blinds mod is in use

* Move part of speed OD scaling into difficulty

* Move length bonus back to PP

* Remove blinds special case

* Revert star rating multiplier decrease

* More balancing

---------

Co-authored-by: StanR <[email protected]>

* Add diffcalc considerations for Magnetised mod (#33004)

* Add diffcalc considerations for Magnetised mod

* Make speed reduction scale with power too

* cleaning up

* Update OsuPerformanceCalculator.cs

* Update OsuPerformanceCalculator.cs

* add new check to avoid overestimation

* fix code style

* fix nvicka

* add database attributes

* Refactor

* Rename `Working` to `WorkingBeatmap`

* Remove redundant condition

* Remove useless variable

* Remove `get` wording

* Rename `calculateScoreAtCombo`

* Remove redundant operator

* Add comments to explain how score-based miss count derivations work

* Remove redundant `decimal` calculations

* use static method to improve performance

* move stuff around for readability

* move logic into helper class

* fix the bug

* Delete OsuLegacyScoreProcessor.cs

* Delete ILegacyScoreProcessor.cs

* revert static method for multiplier

* use only basic combo score attribute

* Clean-up

* Remove unused param

* Update osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs

Co-authored-by: StanR <[email protected]>

* rename variables

* Add `LegacyScoreUtils`

* Add fail safe

* Move `countMiss`

* Better explain `CalculateRelevantScoreComboPerObject`

* Add `OsuLegacyScoreMissCalculator`

* Move `CalculateScoreAtCombo` and `CalculateRelevantScoreComboPerObject`

* Remove unused variables

* Move `GetLegacyScoreMultiplier`

* Add `estimated` wording

---------

Co-authored-by: wulpine <[email protected]>
Co-authored-by: James Wilson <[email protected]>
Co-authored-by: StanR <[email protected]>
Co-authored-by: StanR <[email protected]>
Finadoggie pushed a commit to Finadoggie/osu that referenced this pull request Aug 18, 2025
* basis refactor to allow for more complex SR calculations

* move all possible bonuses into star rating

* decrease star rating scaling to account for overall gains

* add extra FL guard for safety

* move star rating multiplier into a constant

* Reorganise some things

* Add HD and SO to difficulty adjustment mods

* Move non-legacy mod multipliers back to PP

* Some merge fixes

* Fix application of flashlight rating multiplier

* Fix Hidden bonuses being applied when Blinds mod is in use

* Move part of speed OD scaling into difficulty

* Move length bonus back to PP

* Remove blinds special case

* Revert star rating multiplier decrease

* More balancing

---------

Co-authored-by: StanR <[email protected]>
Finadoggie pushed a commit to Finadoggie/osu that referenced this pull request Aug 18, 2025
…he same time (ppy#33066)

* implement stuff

* fix basic issues

* rework calculations

* sanity check

* don't use score based misscount if no scorev1 present

* Update OsuPerformanceCalculator.cs

* update misscount diff attribute names

* add raw score misscount attribute

* introduce more reasonable high bound for misscount

* code quality changes

* Fix osu!catch SR buzz slider detection (ppy#32412)

* Use `normalized_hitobject_radius` during osu!catch buzz slider detection

Currently the algorithm considers some buzz sliders as standstills when
in reality they require movement. This happens because `HalfCatcherWidth`
isn't normalized while `exactDistanceMoved` is, leading to an inaccurate
comparison.

`normalized_hitobject_radius` is the normalized value of `HalfCatcherWidth`
and replacing one with the other fixes the problem.

* Rename `normalized_hitobject_radius` to `normalized_half_catcher_width`

The current name is confusing because hit objects have no radius in the
context of osu!catch difficulty calculation. The new name conveys the
actual purpose of the value.

* Only set `normalized_half_catcher_width` in `CatchDifficultyHitObject`

Prevents potential bugs if the value were to be changed in one of the
classes but not in both.

* Use `CatchDifficultyHitObject.NORMALIZED_HALF_CATCHER_WIDTH` directly

Requested during code review.

---------

Co-authored-by: James Wilson <[email protected]>

* Move osu!catch movement diffcalc to an evaluator (ppy#32655)

* Move osu!catch movement state into `CatchDifficultyHitObject`

In order to port `Movement` to an evaluator, the state has to be either
moved elsewhere or calculated inside the evaluator. The latter requires
backtracking for every hit object, which in the worst case is continued
until the beginning of the map is reached. Limiting backtracking can
lead to difficulty value changes.

Thus, the first option was chosen for its simplicity.

* Move osu!catch movement difficulty calculation to an evaluator

Makes the code more in line with the other game modes.

* Add documentation for `CatchDifficultyHitObject` fields

---------

Co-authored-by: James Wilson <[email protected]>

* Move all score-independent bonuses into star rating (ppy#31351)

* basis refactor to allow for more complex SR calculations

* move all possible bonuses into star rating

* decrease star rating scaling to account for overall gains

* add extra FL guard for safety

* move star rating multiplier into a constant

* Reorganise some things

* Add HD and SO to difficulty adjustment mods

* Move non-legacy mod multipliers back to PP

* Some merge fixes

* Fix application of flashlight rating multiplier

* Fix Hidden bonuses being applied when Blinds mod is in use

* Move part of speed OD scaling into difficulty

* Move length bonus back to PP

* Remove blinds special case

* Revert star rating multiplier decrease

* More balancing

---------

Co-authored-by: StanR <[email protected]>

* Add diffcalc considerations for Magnetised mod (ppy#33004)

* Add diffcalc considerations for Magnetised mod

* Make speed reduction scale with power too

* cleaning up

* Update OsuPerformanceCalculator.cs

* Update OsuPerformanceCalculator.cs

* add new check to avoid overestimation

* fix code style

* fix nvicka

* add database attributes

* Refactor

* Rename `Working` to `WorkingBeatmap`

* Remove redundant condition

* Remove useless variable

* Remove `get` wording

* Rename `calculateScoreAtCombo`

* Remove redundant operator

* Add comments to explain how score-based miss count derivations work

* Remove redundant `decimal` calculations

* use static method to improve performance

* move stuff around for readability

* move logic into helper class

* fix the bug

* Delete OsuLegacyScoreProcessor.cs

* Delete ILegacyScoreProcessor.cs

* revert static method for multiplier

* use only basic combo score attribute

* Clean-up

* Remove unused param

* Update osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs

Co-authored-by: StanR <[email protected]>

* rename variables

* Add `LegacyScoreUtils`

* Add fail safe

* Move `countMiss`

* Better explain `CalculateRelevantScoreComboPerObject`

* Add `OsuLegacyScoreMissCalculator`

* Move `CalculateScoreAtCombo` and `CalculateRelevantScoreComboPerObject`

* Remove unused variables

* Move `GetLegacyScoreMultiplier`

* Add `estimated` wording

---------

Co-authored-by: wulpine <[email protected]>
Co-authored-by: James Wilson <[email protected]>
Co-authored-by: StanR <[email protected]>
Co-authored-by: StanR <[email protected]>
@stanriders stanriders moved this from Pending Deploy to Deployed in Difficulty calculation changes Oct 29, 2025
bdach added a commit to bdach/osu-beatmap-difficulty-lookup-cache that referenced this pull request Nov 10, 2025
…h Hidden mod

Since ppy/osu#31351, Hidden affects star rating
on its own, not only in conjunction with Flashlight like before.

See also: ppy/osu-queue-score-statistics#333.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Deployed

Development

Successfully merging this pull request may close these issues.

4 participants