Skip to content

Conversation

@MrHeliX
Copy link
Contributor

@MrHeliX MrHeliX commented Jul 20, 2024

Fixes hidden not counted as relevant mods when using simulate command without the -nc parameter

Before:
WindowsTerminal_2024-07-20_17-18-01

After:
WindowsTerminal_2024-07-20_17-18-14

@minisbett
Copy link
Contributor

minisbett commented Jul 20, 2024

You would want to remove hidden here then, the code originally intended to only consider hidden a relevant mod if flashlight is enabled

It'd also potentially make sense to make an in-line comment for it, as this method would now differ from the source for this method specified in the comment above

@MrHeliX
Copy link
Contributor Author

MrHeliX commented Jul 20, 2024

You would want to remove hidden here then, the code originally intended to only consider hidden a relevant mod if flashlight is enabled

It'd also potentially make sense to make an in-line comment for it, as this method would now differ from the source for this method specified in the comment above

Of course yeah, updated PR

@peppy peppy requested a review from smoogipoo July 29, 2024 02:47
@smoogipoo
Copy link
Contributor

smoogipoo commented Jul 30, 2024

I'm not sure this is entirely correct because SR-wise HD only has an effect when combined with FL.

That is, perhaps the following should only be applying this filter to the mods passed to the difficulty calculator, rather than the ScoreInfo:

var workingBeatmap = ProcessorWorkingBeatmap.FromFileOrId(Beatmap);
var mods = NoClassicMod ? GetMods(ruleset) : LegacyHelper.FilterDifficultyAdjustmentMods(workingBeatmap.BeatmapInfo, ruleset, GetMods(ruleset));
var beatmap = workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo, mods);
var beatmapMaxCombo = GetMaxCombo(beatmap);
var statistics = GenerateHitResults(Accuracy / 100, beatmap, Misses, Mehs, Goods);
var scoreInfo = new ScoreInfo(beatmap.BeatmapInfo, ruleset.RulesetInfo)
{
Accuracy = GetAccuracy(statistics),
MaxCombo = Combo ?? (int)Math.Round(PercentCombo / 100 * beatmapMaxCombo),
Statistics = statistics,
Mods = mods,
TotalScore = Score,
};
var difficultyCalculator = ruleset.CreateDifficultyCalculator(workingBeatmap);
var difficultyAttributes = difficultyCalculator.Calculate(mods);
var performanceCalculator = ruleset.CreatePerformanceCalculator();
var performanceAttributes = performanceCalculator?.Calculate(scoreInfo, difficultyAttributes);

As it is, it also means some other mods like TC are filtered out. As for ScoreInfo, the only filtering that needs to happen is:

https://github.com/ppy/osu-queue-score-statistics/blob/e24ca9f582542119e003dc047df5c693ae1a0b59/osu.Server.Queues.ScoreStatisticsProcessor/Processors/ScorePerformanceProcessor.cs#L171-L183

Also, the NoClassicMod is horribly mis-intentioned here - it's being used to filter the mods but really the filtering should be applied by default regardless of that option. There should be two options - --no-classic and, let's say, --no-filter. Or, we can invert and add --classic, I'm fine with either as long as it's agreeable.
This doesn't need to be addressed in this PR, but is something to think about... I'm fine using that option for now.

@MrHeliX
Copy link
Contributor Author

MrHeliX commented Sep 26, 2024

Closing this in favour of #216

@MrHeliX MrHeliX closed this Sep 26, 2024
@MrHeliX MrHeliX deleted the fix_disappearing_hidden branch September 26, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants