-
Notifications
You must be signed in to change notification settings - Fork 629
Add the ability to Randomize Music and Sound Effects and Cosmetrics based on Rando File Seed. #5970
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
Add the ability to Randomize Music and Sound Effects and Cosmetrics based on Rando File Seed. #5970
Conversation
|
i think "Disabled" might be misleading. maybe "Manual" makes more sense, as the functionality is actually "only randomize when the player presses the randomize all button" either that or rename the option from "Randomize All Cosmetics Mode" to "Automatically Randomize All Cosmetics" |
|
ideally this would come after #5900 which moved some of this code to hooks |
|
5900 is merged now, so this can be updated to match. |
c7e72d4 to
74d0be9
Compare
Add "Randomize All Music and Sound Effects Mode" Combobox The Options are : - Disabled: No music or sound effects are randomized. - On New Scene: Randomizes when you enter a new scene. - On Rando Gen Only: Randomizes only when you generate a new randomizer - On File Load: Randomizes on File Load. - On File Load (Seeded):Randomizes on file load based on the current randomizer seed/file. Removed "Randomize All Music and Sound Effects on Randomizer Generation" checkbox. Removed "Randomize All Music and Sound Effects on New Scene" checkbox.
Add "Randomize All Cosmetics Mode" Combobox The Options are : - Disabled: No cosmetics are randomized. - On New Scene: Randomizes when you enter a new scene. - On Rando Gen Only: Randomizes only when you generate a new randomizer - On File Load: Randomizes on File Load. - On File Load (Seeded):Randomizes on file load based on the current randomizer seed/file. Removed "Randomize All on Randomizer Generation" checkbox. Removed "Randomize All on New Scene" checkbox.
"Automatically Randomize All Music and Sound Effects" Renamed "Randomize All Cosmetics Mode" to "Automatically Randomize All Cosmetics"
"Automatically Randomize All Cosmetics" was set to "On File Load (Seeded)" and Audio Editor "Automatically Randomize All Music and Sound Effects" set to "On File Load" causing the audio editor to get seeded by the cosmetics setting.
74d0be9 to
49be5ba
Compare
Pepper0ni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I back up Bria in that Disabled should be renamed and the tooltip changed, as it's misinforming with the current text, making it sound like it disabled all randomisation
Also, random seeded does not work for vanilla files, when other seeded randomness such as enemy rando do, IIRC based on file creation time, which should be fixed
I did some tests and the So when the player loads the file for the first time the seed is |
and changed the tooltip to "Manual: Manually randomize music or sound effects by pressing the 'Randomize all Groups' button" Renamed the "Disabled" option in "cosmeticsRandomizerModes" to "Manual" and changed the tooltip to "Manual: Manually randomize cosmetics by pressing the 'Randomize all' button" Removed the "IS_RANDO" in "AudioEditor.cpp: RandomizeGroup" and "CosmeticsEditor.cpp: RandomizeColor" if statements so "On File Load (Seeded)" can be used in Vanilla (minor issue on first load will have a false seed of 0 till the player saves for the first time making the true seed).
|
Figured out the issue audio and cosmetics are randomized before the |
|
Yeah, that’s tricky, might need to rely on something else for randomness in vanilla. the fileCreatedAt is intentionally set when the player makes their first input, which is used for RTA timing speed runs and races and such |
|
I don't know what could be used that is set once and saved to the file like |
|
it sounds like |
I made your suggestion its own PR #6070 |
| #if !defined(__SWITCH__) && !defined(__WIIU__) | ||
| std::mt19937 rng(seed); | ||
| #else | ||
| std::mt19937_64 rng(seed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
|
|
||
| void AudioEditorRegisterOnLoadGameHook() { | ||
| GameInteractor::Instance->RegisterGameHook<GameInteractor::OnLoadGame>([](int32_t fileNum) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be using COND_HOOK, but I can make a follow up PR converting the other 2 functions to hooks too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want me to make a PR converting those functions to use COND_HOOK ? I was working on it before I realized this PR got merged lol.
I added support for randomizing music, sound effects, and cosmetics on file load, with or without a seed.
Instead of adding a bunch of new checkboxes, I removed the old ones and replaced them with a single combobox as shown below.
Audio Editor:
I have removed both "Randomize All Music and Sound Effects on Randomizer Generation" and
"Randomize All Music and Sound Effects on New Scene" checkboxs.
I have replaced it with "Automatically Randomize All Music and Sound Effects" Combobox
The Options are :
randomizer seed/file.
Manually pressing the "Randomize All Groups" button will ignore the "Automatically Randomize All Music and Sound Effects" setting.

Note : Combobox name shown in image is old
Cosmetics Editor:
I have removed both "Randomize All on Randomizer Generation" and
"Randomize All on New Scene" checkboxs.
I have replaced it with "Automatically Randomize All Cosmetics" Combobox.
The Options are :
randomizer seed/file.
Manually pressing the "Randomize All" button will ignore the "Automatically Randomize All Cosmetics" setting

Note : Combobox name shown in image is old
Build Artifacts