Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow choosing different background/audio files for individual difficulties #30860

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

frenzibyte
Copy link
Member

@frenzibyte frenzibyte commented Nov 24, 2024

RFC. I was going to start by following what the title of the issue thread states, which is to just not delete files that are used by other difficulties. However, the underlying discussion thread asks for more than that, and such a change does not really make much sense if the general code still assumes all beatmaps should use one background/audio file, so I took it one step further and changed the whole logic to properly allow difficulties to have their own background/audio.

This is accompanied by a button that allows the mapper to still update all other difficulties with the chosen background/audio file. If the mapper has chosen only a new background file, pressing the button only updates the background of other difficulties, it does not touch the audio file. The same goes the other way around.

Preview:

CleanShot.2024-11-24.at.00.29.57.mp4

@Phippe
Copy link

Phippe commented Nov 25, 2024

I would've assumed that there would be something like a default image for all difficulties. Then each difficulty would have the option to overwrite the default image, but also to change back to it.

This would make the case easier where there are a large number of difficulties, but only a few of them have custom backgrounds. If you wanted to change the background for all the difficulties that share the same default background, you would have to do so for each difficulty separately.

Just my two cents though, I'm not a mapper.

@bdach
Copy link
Collaborator

bdach commented Nov 25, 2024

I would've assumed that there would be something like a default image for all difficulties. Then each difficulty would have the option to overwrite the default image, but also to change back to it.

I would also assume so yes.

This looks half-baked to me. There should be a way to replace the background on all difficulties at once, and it should be the default. Replacing on a single difficulty should be the exception. And maybe there should be a dropdown which allows picking from existing backgrounds from all the difficulties of the set.

@peppy
Copy link
Member

peppy commented Nov 25, 2024

Hmm, I dunno. I thought this PR is providing a pretty good UX until we actually have a concept of set level metadata. It meets existing users' expectations.

Adding a "this beatmap overrides the default" is going to be a pain to implement a good UX for. But I guess I'm all ears?

This would make the case easier where there are a large number of difficulties, but only a few of them have custom backgrounds. If you wanted to change the background for all the difficulties that share the same default background, you would have to do so for each difficulty separately.

This seems very edge case.

@bdach
Copy link
Collaborator

bdach commented Nov 25, 2024

Easiest would be to ask user on file selection whether to use it on all difficulties or just the one. Probably fade out the file picker and have 2 buttons in the same popover to choose.

@peppy
Copy link
Member

peppy commented Nov 25, 2024

Kinda the same thing really, just more explicit.

But it would solve my remaining issue with this PR, which is that it is applying the action to both background and audio at the same time (should really be per resource).

@frenzibyte
Copy link
Member Author

But it would solve my remaining issue with this PR, which is that it is applying the action to both background and audio at the same time (should really be per resource).

It is technically doing it per resource if you check the code. Is the frontend not conveying that well?

I would've assumed that there would be something like a default image for all difficulties. Then each difficulty would have the option to overwrite the default image, but also to change back to it.

I would also assume so yes.

This looks half-baked to me. There should be a way to replace the background on all difficulties at once, and it should be the default. Replacing on a single difficulty should be the exception. And maybe there should be a dropdown which allows picking from existing backgrounds from all the difficulties of the set.

The way it was implemented in this PR followed the natural storage of metadata in beatmaps, choosing a background/audio updates the metadata of the current difficulty, and the button changes all other difficulties to update as such.

I've also thought about a dialog after opening the PR but I wasn't sure if it's worth the effort. Now that it's brought up, and the button is already misleading in the idea of "does it update both background and audio or is it per-resource", so I will update the PR as such.

@peppy
Copy link
Member

peppy commented Nov 26, 2024

@frenzibyte to confirm we're all on the same page, I think spaceman is proposing that in the existing file chooser popup, after selecting a file, the file chooser content is replaced with two buttons (in the same popup) which let the mapper select [apply to this difficulty] [apply to all difficulties]. Should only show this if there's more than one difficulty already.

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

Successfully merging this pull request may close these issues.

Adding a new background/audio file in the editor may remove file which is used in other difficulties
4 participants