Skip to content

Added "LN Ratio" display in Mania in the place of useless "key count"#37581

Open
pacowoc wants to merge 4 commits intoppy:masterfrom
pacowoc:mania_ln_ratio
Open

Added "LN Ratio" display in Mania in the place of useless "key count"#37581
pacowoc wants to merge 4 commits intoppy:masterfrom
pacowoc:mania_ln_ratio

Conversation

@pacowoc
Copy link
Copy Markdown

@pacowoc pacowoc commented Apr 29, 2026

The "Key Count" metric in mania is very useless since you are already expected to play maps with a specific Key Count when you are queueing.
This PR inserts the proportion of LNs (Long Notes) in the place of that metric since it is one of the ways players can gudge their skillsets (This idea comes from reddit)
Also improved the test suite for other skillsets by making the architecture more minor ruleset friendly

using var reader = new StreamReader(resourceStream);
return JsonConvert.DeserializeObject<APIBeatmap[]>(reader.ReadToEnd())!;
}
case "mania":
using var reader = new StreamReader(resourceStream);
return JsonConvert.DeserializeObject<APIBeatmap[]>(reader.ReadToEnd())!;
}
default:
{
private RankedPlayScreen screen = null!;

[Resolved]

[Resolved]
private RulesetStore rulesetStore { get; set; } = null!;
private RankedPlayScreen screen = null!;
AddStep("load screen", () => LoadScreen(screen = new RankedPlayScreen(MultiplayerClient.ClientRoom!)));
AddUntilStep("screen loaded", () => screen.IsLoaded);
}
[Test]
@IceDynamix
Copy link
Copy Markdown

IceDynamix commented Apr 29, 2026

i think this should be solved by changing the implementation of ManiaRuleset.GetBeatmapAttributesForDisplay instead? this feels very hacky. there is also no consideration for localization because the attribute labels currently use SongSelectStrings. also, the number should also be formatted as a percentage if anything.

@pacowoc
Copy link
Copy Markdown
Author

pacowoc commented Apr 29, 2026

i think this should be solved by changing the implementation of ManiaRuleset.GetBeatmapAttributesForDisplay instead? this feels very hacky. there is also no consideration for localization because the attribute labels currently use SongSelectStrings. also, the number should also be formatted as a percentage if anything.

There are absolutely zero consideration of localization in 99% of ranked UI anyways

};
}

public override IEnumerable<RulesetBeatmapAttribute> GetBeatmapAttributesForDisplay(IBeatmapInfo beatmapInfo, IReadOnlyCollection<Mod> mods, int SliderCount)
yield return new RulesetBeatmapAttribute(SongSelectStrings.Accuracy, @"OD", originalDifficulty.OverallDifficulty, adjustedDifficulty.OverallDifficulty, 10);
yield return new RulesetBeatmapAttribute(SongSelectStrings.HPDrain, @"HP", originalDifficulty.DrainRate, adjustedDifficulty.DrainRate, 10);
}
/// <summary>
/// <summary>
/// Overload of <see cref="GetAdjustedDisplayDifficulty"/> for display on Ranked Cards
/// </summary>
public virtual IEnumerable<RulesetBeatmapAttribute> GetBeatmapAttributesForDisplay(IBeatmapInfo beatmapInfo, IReadOnlyCollection<Mod> mods, int SliderCount)
},
..ruleset.GetBeatmapAttributesForDisplay(beatmap, [])
.Select(attribute => new AttributeRow(attribute))
..(beatmap.RulesetID==3 ? ruleset.GetBeatmapAttributesForDisplay(beatmap, [],beatmap.SliderCount) : ruleset.GetBeatmapAttributesForDisplay(beatmap, []))
},
..ruleset.GetBeatmapAttributesForDisplay(beatmap, [])
.Select(attribute => new AttributeRow(attribute))
..(beatmap.RulesetID==3 ? ruleset.GetBeatmapAttributesForDisplay(beatmap, [],beatmap.SliderCount) : ruleset.GetBeatmapAttributesForDisplay(beatmap, []))
},
..ruleset.GetBeatmapAttributesForDisplay(beatmap, [])
.Select(attribute => new AttributeRow(attribute))
..(beatmap.RulesetID==3 ? ruleset.GetBeatmapAttributesForDisplay(beatmap, [],beatmap.SliderCount) : ruleset.GetBeatmapAttributesForDisplay(beatmap, []))
..ruleset.GetBeatmapAttributesForDisplay(beatmap, [])
.Select(attribute => new AttributeRow(attribute))
..(beatmap.RulesetID==3 ? ruleset.GetBeatmapAttributesForDisplay(beatmap, [],beatmap.SliderCount) : ruleset.GetBeatmapAttributesForDisplay(beatmap, []))
.Select(attribute =>
..(beatmap.RulesetID==3 ? ruleset.GetBeatmapAttributesForDisplay(beatmap, [],beatmap.SliderCount) : ruleset.GetBeatmapAttributesForDisplay(beatmap, []))
.Select(attribute =>
{
return new AttributeRow(attribute);
{
private float normalizedValue => float.Clamp(attribute.AdjustedValue / attribute.MaxValue, 0, 1);

private string getAdjustedValuestring()
{
case "LN Ratio":
return attribute.AdjustedValue.ToString("P1");
default:
@pacowoc
Copy link
Copy Markdown
Author

pacowoc commented Apr 29, 2026

Also the Tests here are bugging so much that it is insane, the pickscreen test stop midway on first run but runs normally on second run lmao, idk why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants