Skip to content

Adds "Randomize on Randomizer Generation" options to Audio and Cosmetics Editors#5387

Merged
Malkierian merged 6 commits intoHarbourMasters:developfrom
Glought:Randomize-Audio-and-Cosmetics-on-Randomizer-Generation
Aug 25, 2025
Merged

Adds "Randomize on Randomizer Generation" options to Audio and Cosmetics Editors#5387
Malkierian merged 6 commits intoHarbourMasters:developfrom
Glought:Randomize-Audio-and-Cosmetics-on-Randomizer-Generation

Conversation

@Glought
Copy link
Contributor

@Glought Glought commented Apr 11, 2025

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

Glought added 3 commits April 11, 2025 08:45
…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.
@Pepper0ni
Copy link
Contributor

Pepper0ni commented Jun 13, 2025

(At least) cosmetics on randomiser generation causes a settings eating crash if a seed is generated immediately after another seed stops generation (Mash the generate button) with address not mapped to object. Will investigate to see if it's specific to this code or some concurrency issue with the various configs saving.

Nevermind, got it without mashing, investigating further.

Copy link
Contributor

@Pepper0ni Pepper0ni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Glought
Copy link
Contributor Author

Glought commented Jun 13, 2025

(At least) cosmetics on randomiser generation causes a settings eating crash if a seed is generated immediately after another seed stops generation (Mash the generate button) with address not mapped to object. Will investigate to see if it's specific to this code or some concurrency issue with the various configs saving.

Nevermind, got it without mashing, investigating further.

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.

@Pepper0ni
Copy link
Contributor

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".
@Glought Glought requested review from Pepper0ni and serprex June 14, 2025 16:37
@Glought
Copy link
Contributor Author

Glought commented Jun 14, 2025

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.

I've made some changes: audio and cosmetics are now randomized after the Randomizer finishes generating. Hopefully, that resolves your crashing issue.

@Pepper0ni
Copy link
Contributor

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"
Copy link
Contributor

@Pepper0ni Pepper0ni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still works fine.

@Malkierian Malkierian merged commit bdaf352 into HarbourMasters:develop Aug 25, 2025
6 checks passed
krazyjakee pushed a commit to krazyjakee/OOT that referenced this pull request Sep 6, 2025
…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>
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.

4 participants