Skip to content

Add Starting Songs Option#2221

Merged
briaguya0 merged 18 commits intoHarbourMasters:developfrom
Patrick12115:Starting-Songs
Jan 19, 2023
Merged

Add Starting Songs Option#2221
briaguya0 merged 18 commits intoHarbourMasters:developfrom
Patrick12115:Starting-Songs

Conversation

@Patrick12115
Copy link
Contributor

@Patrick12115 Patrick12115 commented Dec 20, 2022

Adds starting songs to the randomizer menu

Currently it is created two entries in the spoiler log, one under the submenu "Starting Songs" and one with just the song name.
If anyone could point me in the direction of excluding the ones that are just song names, I would very much appreciate it. This is my first PR ever, so please let me know if I did anything wrong, still learning and trying to get better.

image

Build Artifacts

@Patrick12115
Copy link
Contributor Author

One workaround for this, would be to do it the same way the other starting items, like Kokiri Sword and Deku Shield are and just write each song name as "Start with Song Name" and then just set the submenu back to false. The only issue with this would be that in the in game menu, every song would be written like that, which isn't a huge deal, but a little redundant and cluttered, since it's under the "Starting Songs" column.

Comment on lines +438 to +455
for (std::vector<Option*>* menu : startingInventoryOptions) {
for (size_t i = 0; i < menu->size(); ++i) {
const auto setting = menu->at(i);
// Starting Songs
if (setting->GetName() == "Zelda's Lullaby" ||
setting->GetName() == "Epona's Song" ||
setting->GetName() == "Saria's Song" ||
setting->GetName() == "Sun's Song" ||
setting->GetName() == "Song of Time" ||
setting->GetName() == "Song of Storms" ||
setting->GetName() == "Minuet of Forest" ||
setting->GetName() == "Bolero of Fire" ||
setting->GetName() == "Serenade of Water" ||
setting->GetName() == "Requiem of Spirit" ||
setting->GetName() == "Nocturne of Shadow" ||
setting->GetName() == "Prelude of Light") {
jsonData["settings"][setting->GetName()] = setting->GetSelectedOptionText();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

How come this loop is made seperately from the loop below?

setting->GetName() == "Gold Skulltula Tokens" ||
setting->GetName() == "Start with Fairy Ocarina" ||
setting->GetName() == "Start with Kokiri Sword" ||
setting->GetName() == "Start with Kokiri Sword" ||
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: should probably trim the space here


Menu startingItems = Menu::SubMenu("Items", &startingItemsOptions, false);
Menu startingSongs = Menu::SubMenu("Ocarina Songs", &startingSongsOptions, false);
Menu startingSongs = Menu::SubMenu("Starting Songs", &startingSongsOptions, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

This menu isn't necessarily for us, but rather for 3d rando to display the options available for the player. (You already exposed the options through our ImGui implementation.)
To answer your question in the OP, you're printing twice since the true here refers whether to print to the spoiler log.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I realize that, but without using their method, it either writes all the songs unorganized in the spoiler log, or I have to change all the names to "start with 'song name'" Which, either way is fine, but I'm just not sure what would be preferred. Using their sub menu makes it cleaner everywhere, minus the fact that it results in a double entry

Copy link
Contributor

Choose a reason for hiding this comment

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

Personally, I would find it consistent with all the other options if starting songs began with "Start With". I wonder if doing this and removing the loop I mentioned in this review will a) have a single set of song options and b) organize the result.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did it before, and if I remember correctly it did organize it in the spoiler log. not sure what you mean by single set of song options though

Copy link
Contributor

Choose a reason for hiding this comment

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

You mentioned a double entry somewhere? Just wanted to make sure we were on the same page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes, my bad. Yeah, it'll definitely do both those things.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

That's what the menu looks like now with the changes and only one entry in the spoiler log for each song.

Copy link
Contributor

@Archez Archez left a comment

Choose a reason for hiding this comment

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

Can you add the new CVars you made into the randomizerCvars list in soh/soh/Enhancements/presets.h, sorted alphabetically. This makes it so applying the "Default" preset will clear out the starting songs.

@Patrick12115
Copy link
Contributor Author

@Archez Done. And thank you for being detailed in you comment, really made it easy for a noob like me!

@briaguya0 briaguya0 force-pushed the develop branch 2 times, most recently from 05bd4a3 to ba13e6b Compare January 17, 2023 05:34
@Archez
Copy link
Contributor

Archez commented Jan 18, 2023

@Patrick12115 Looks like something went wrong with one of the merges from develop branch. Your randomizer.cpp changes are showing things like boss shuffle and 100 gs token shuffle (I'm assuming you may have accidentally merged RRs experimental build or something). You probably experienced a lot of merge conflicts in that file due to the CVar_ functions getting renamed, make sure to preserve the new names for the functions like CvarGetInteger()

@Patrick12115
Copy link
Contributor Author

@Archez Yeah, I'm not sure what happened there, but I THINK, I got it all fixed

@briaguya0 briaguya0 merged commit c0ad43e into HarbourMasters:develop Jan 19, 2023
@Patrick12115 Patrick12115 deleted the Starting-Songs branch February 22, 2023 23:27
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