kinsi55 / BeatSaber_BetterSongList

Adds Various improvements to the Basegame song list like Filters, a persisted state and much more
MIT License
42 stars 12 forks source link

Can plugin sort by each DifficultyBeatmap? #23

Closed nanikit closed 1 year ago

nanikit commented 1 year ago

I'm implementing accuracy sorter, but each difficulty has different accuracy so I want to highlight the difficulty (and the characteristic) for showing which difficulty is selected as sorted accuracy.

At a glance BetterSongList doesn't care this so maybe I'll manipulate / hook base game object directly. But at least I have to know whether my accuracy sorter is selected or deselected so I can toggle highlighting at proper time.

Do you have any idea? I can't sure whether there is a way for knowing selection changes already.

kinsi55 commented 1 year ago

You should implement it the same way as, for example, the "Ranked Stars" sorter - When sorting Ascending, sort by the lowest value of all difficulties, when sorting Descending by the highest value of all difficulties.

As for knowing when your sort / filter is selected, no that currently is not a thing. I could add it but Sorters / Filters really shouldnt be modifying the UI imo. Better Song List is meant to be the simple version of Better Song Search - There for example this wouldnt be a problem because the displayed difficulties are sorted by whatever you are sorting the songs by.

nanikit commented 1 year ago

You should implement it the same way as

I can't agree with this yet. One of my objectives is to find easy song for better acc or rest. I won't be able to find easy difficulty of song containing harder difficulty. It is not a thing for challenger, but it's a thing for me.

Sorters / Filters really shouldnt be modifying the UI imo.

That sounds like what I'm making isn't sorter. Then if I still want to do this, then should I fork your plugin?

kinsi55 commented 1 year ago

What you are building should be a seperate plugin since you plan to use more complex logic.

It seems like you are trying to accomplish similar goals as SmartSongSuggest / PP booster. Sorters / Filters in Better Song List should be completely objective, 1:1 based off the numbers of the map

nanikit commented 1 year ago

I just tried the mod you suggested (SmartSongSuggest, another one seems to be not maintained). I understand your words as you defined sorter as you mentioned, and my behavior will not be supported.

I want to use the base game UI so I want to reuse many parts of this plugin (BetterSongList), may I fork your plugin or do a harmony thing?

kinsi55 commented 1 year ago

Obviously I cannot prevent you from making a fork - I can just give you my advice and say what you build should be a standalone plugin which then for example generates a playlist like SmartSongSuggest. You will sooner than later run into limitations because you are trying to make the basegame UI do something its not meant to do.

nanikit commented 1 year ago

I think I finally understand you words. So because I want to reuse basegame UI, the behavior I wanted will make fragile part.

Then suggested alternative is making new UI by using BSML or else. But I'm not experienced with this, current shortest path is just using this plugin. Maybe this will break in the future, I can think about it later.

kinsi55 commented 1 year ago

Essentially yeah - But also having a custom UI allows for a much better User experience because you can display information much more clearly. With your approach you can only highlight one single difficulty that you are suggesting - But if you have your own UI you can have a list of songs and suggest multiple difficulties of it, directly display the current accuracy next to the difficulty, etc.

BSML is not super hard, if you want a simple example to play around with check out Tweaks :)

nanikit commented 1 year ago

I think the best user experience is using the current UI, just this abusing limitation is the only obstacle and reasonable not to select it.

There are reasons. There is no need for users to learn new things(UI), no cost to mode change, and it gives integrated feeling.

So I will try this first, and maybe I can learn BSML later.