Adds "Randomize on Randomizer Generation" options to Audio and Cosmetics Editors#5387
Conversation
…cs Editors * Added "Randomize All Music and Sound Effects on Randomizer Generation" to the Audio Editor. * Added "Randomize All on Randomizer Generation" to the Cosmetics Editor. When enabled, these options randomize audio and/or cosmetics during a new randomizer generation.
* It is executed on Randomizer Generation.
…Generation" options to use the "OnRandomizerGeneration" Hook.
|
Nevermind, got it without mashing, investigating further. |
Pepper0ni
left a comment
There was a problem hiding this comment.
I'm going to tentatively approve right now, as the crashing issue seems to be the fault of randomiser code not anything in this PR, and it otherwise works as intended.
Odd though my testing i experience no crashing and just tested now mashing generating randos in both the ingame file menu and SoH Gui menu I didn't get any crashing. I'm on Windows 10 if that helps in case you use mac or Linux. |
|
I am on linux, but I suspect it's more likely the debugger slowing down saving and making the timings different, as the likely cause is it trying to save to the json while the cosmetic editor is. |
Renamed "GameInteractor_ExecuteOnRandomizerGeneration" to "GameInteractor_ExecuteOnGenerationCompletion" Moved "GameInteractor_ExecuteOnGenerationCompletion" from "GenerateRandomizer" to the end of "GenerateRandomizerImgui".
I've made some changes: audio and cosmetics are now randomized after the Randomizer finishes generating. Hopefully, that resolves your crashing issue. |
Thanks, though i think the real fix is nothing to do with your code, I'll push a PR for it |
…teractor_Hooks.h" and "GameInteractor_Hooks.cpp" The "OnGenerationCompletion" hook is now called directly at the end of "GenerateRandomizerImgui" in "randomizer.cpp"
…ics Editors (HarbourMasters#5387) * Add "Randomize on Randomizer Generation" options to Audio and Cosmetics Editors * Added "Randomize All Music and Sound Effects on Randomizer Generation" to the Audio Editor. * Added "Randomize All on Randomizer Generation" to the Cosmetics Editor. When enabled, these options randomize audio and/or cosmetics during a new randomizer generation. * Added "OnRandomizerGeneration" Hook. * It is executed on Randomizer Generation. * Changed AudioEditor and CosmeticsEditor "Randomize all on Randomizer Generation" options to use the "OnRandomizerGeneration" Hook. * Renamed "OnRandomizerGeneration" to "OnGenerationCompletion. Renamed "GameInteractor_ExecuteOnRandomizerGeneration" to "GameInteractor_ExecuteOnGenerationCompletion" Moved "GameInteractor_ExecuteOnGenerationCompletion" from "GenerateRandomizer" to the end of "GenerateRandomizerImgui". * Removed "GameInteractor_ExecuteOnGenerationCompletion()" from "GameInteractor_Hooks.h" and "GameInteractor_Hooks.cpp" The "OnGenerationCompletion" hook is now called directly at the end of "GenerateRandomizerImgui" in "randomizer.cpp" --------- Co-authored-by: Glought <663343+Glought@users.noreply.github.com>
Adds "Randomize on Randomizer Generation" options to Audio and Cosmetics Editors
Adds "Randomize All Music and Sound Effects on Randomizer Generation" option to the Audio Editor.
Adds "Randomize All on Randomizer Generation" option to the Cosmetics Editor.
When enabled, these options randomize audio and/or cosmetics during a new randomizer generation.
It's functionally the same as pressing the "Randomize All" Button.
Build Artifacts