ppy / osu-web

the browser-facing portion of osu!
https://osu.ppy.sh
GNU Affero General Public License v3.0
981 stars 383 forks source link

apiv2 POST /beatmaps/{beatmap}/attributes returns incorrect star_rating with mods #10294

Closed grumd closed 1 year ago

grumd commented 1 year ago

It seems like the only mod affecting star_rating in the API is DT. HR doesn't affect the star_rating value.

nomod: 4.43 DT: 5.92 HR: 4.43 DTHR: 5.92

image

grumd commented 1 year ago

I think it DOES work properly when ruleset is provided.

The ruleset is said to "Defaults to ruleset of the specified beatmap."

But feel free to close this issue if it's a "won't fix" thing

tsunyoku commented 1 year ago

looked into this one locally, can reproduce. the mods that are passed on the web request to the difficulty cache API are correct. the same issue occurs even when providing the ruleset so it's not that. i presume this is an issue with the difficulty attributes which are stored in the database (and how they're calculated)?

another thing i observed, and @grumd's original report also displays, is that the great_hit_window attribute (specific to taiko) is updated when HR is passed as a mod

i tried to reproduce this with all modes: the SR (as well as any other attributes) were updated correctly for osu!std, osu!fruits and osu!mania. so it seems this issue is specific to taiko

i'm not sure what would coerce it to calculate HR and nomod as the same SR - HR is registed as a difficulty increasing mod for taiko. will require a deeper look to see why this is happening, but the cause is definitely not to do with osu-web

peppy commented 1 year ago

cc @smoogipoo

smoogipoo commented 1 year ago

This is working as intended. If there's an issue here, it's with the difficulty calculator implementation and not the/any server-side components.

grumd commented 11 months ago

@smoogipoo I haven't rechecked the issue, but the problem was that "ruleset" is not being defaulted to the ruleset of the specified beatmap. When ruleset is undefined, calculations are wrong. The API should provide a default value for ruleset before calling difficulty calculator.

nanaya commented 11 months ago

The api always passes ruleset to the difficulty calculator. Please provide example showing otherwise.