osu icon indicating copy to clipboard operation
osu copied to clipboard

Make `BeatmapAttributeText` to have mod-relevant info

Open Givikap120 opened this issue 1 year ago • 8 comments

  • Fixes https://github.com/ppy/osu/issues/21946

As you can see, current BeatmapAttributeText takes the data directly from the beatmap class. For something like beatmap name it's fine, but for example Star Rating will quickly become irrelevant if you will switch Ruleset or enable some Mods.

This PR fixes this by changing the update logic of such attributes as:

  • BPM
  • Length
  • Circle Size
  • HP Drain
  • Approach Rate
  • Overall Difficulty They will be updated on: Beatmap change, Ruleset change, Mod change, Mod Setting change.

In the separate branch of logic (only on Beatmap change) will be updated such attributes as:

  • Star Rating
  • (new) Max Performance, aka pp for SS. This attribute was requested by many players. Those attributes are updated via BindableDifficulty.

For Max Performance attribute to work, code for simulating SS play was moved from PerformanceBreakdownCalculator to the corresponding util function in the newly created ScoreUtils class.

As bdach requested, attributes text data will be updated according to the category of current attribute (for performance reasons).

Givikap120 avatar Jul 27 '24 23:07 Givikap120

So this is just adding a bunch of new components that respect mods? And BeatmapAttributeText continues to not do so?

I cannot accept that premise. To me this PR is not valid because it does not do the right thing.

BeatmapAttributeText exists now and users are using it. So it must be made to work correctly. Or something has to be done silently for users to keep their skins working.

bdach avatar Jul 27 '24 23:07 bdach

So this is just adding a bunch of new components that respect mods? And BeatmapAttributeText continues to not do so?

I cannot accept that premise. To me this PR is not valid because it does not do the right thing.

BeatmapAttributeText exists now and users are using it. So it must be made to work correctly. Or something has to be done silently for users to keep their skins working.

So you propose changing BeatmapAttributeText to respect mods? If yes - the only question is what to do with toggle AccountForRate that makes AR and OD rate-adjusted? Are there a way to hide a toggle if selected something other than AR/OD? Or just remove it in general

Givikap120 avatar Jul 28 '24 00:07 Givikap120

the only question is what to do with toggle AccountForRate that makes AR and OD rate-adjusted? Are there a way to hide a toggle if selected something other than AR/OD? Or just remove it in general

Either use a different placeholder for not rate-adjusted AR/OD or just use rate-adjusted always. It's not like the mod select display has a toggle for accounting for rate or not is it?

bdach avatar Jul 28 '24 00:07 bdach

So this is just adding a bunch of new components that respect mods? And BeatmapAttributeText continues to not do so?

I cannot accept that premise. To me this PR is not valid because it does not do the right thing.

BeatmapAttributeText exists now and users are using it. So it must be made to work correctly. Or something has to be done silently for users to keep their skins working.

Change PR according to this. Now new tests are required?

Givikap120 avatar Jul 28 '24 11:07 Givikap120

Changed the logic to make it update only necessary info instead of all Still some room for optimization, but the effect is not worth it for extra complexity

Givikap120 avatar Aug 01 '24 18:08 Givikap120

Please update the PR description to explain in detail what this does. Users need documentation of this in changelogs and I'm not going to go through and do this myself from the code.

peppy avatar Aug 08 '24 14:08 peppy

Please update the PR description to explain in detail what this does. Users need documentation of this in changelogs and I'm not going to go through and do this myself from the code.

made detailed description

Givikap120 avatar Aug 08 '24 18:08 Givikap120

How are you testing this btw? There doesn't look to be a test scene setup.

peppy avatar Aug 09 '24 09:08 peppy