mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-30 23:10:14 -05:00
Add Starting Songs Option (#2221)
This commit is contained in:
parent
d6dbaacb03
commit
c0ad43e509
@ -260,11 +260,23 @@ const std::vector<const char*> randomizerCvars = {
|
||||
"gRandomizeSkipTowerEscape",
|
||||
"gRandomizeStartingAge",
|
||||
"gRandomizeStartingConsumables",
|
||||
"gRandomizeStartingBoleroOfFire",
|
||||
"gRandomizeStartingDekuShield",
|
||||
"gRandomizeStartingEponasSong",
|
||||
"gRandomizeStartingKokiriSword",
|
||||
"gRandomizeStartingMapsCompasses",
|
||||
"gRandomizeStartingMinuetOfForest",
|
||||
"gRandomizeStartingNocturneOfShadow",
|
||||
"gRandomizeStartingOcarina",
|
||||
"gRandomizeStartingPreludeOfLight",
|
||||
"gRandomizeStartingRequiemOfSpirit",
|
||||
"gRandomizeStartingSariasSong",
|
||||
"gRandomizeStartingSerenadeOfWater",
|
||||
"gRandomizeStartingSkulltulaToken",
|
||||
"gRandomizeStartingSongOfStorms",
|
||||
"gRandomizeStartingSongOfTime",
|
||||
"gRandomizeStartingSunsSong",
|
||||
"gRandomizeStartingZeldasLullaby",
|
||||
"gRandomizeStoneCount",
|
||||
"gRandomizeSunlightArrows",
|
||||
"gRandomizeTokenCount",
|
||||
|
@ -509,18 +509,18 @@ namespace Settings {
|
||||
&StartingRutoBottle,
|
||||
};
|
||||
|
||||
Option StartingZeldasLullaby = Option::U8 ("Zelda's Lullaby", {"Off", "On"}, {""});
|
||||
Option StartingEponasSong = Option::U8 ("Epona's Song", {"Off", "On"}, {""});
|
||||
Option StartingSariasSong = Option::U8 ("Saria's Song", {"Off", "On"}, {""});
|
||||
Option StartingSunsSong = Option::U8 ("Sun's Song", {"Off", "On"}, {""});
|
||||
Option StartingSongOfTime = Option::U8 ("Song of Time", {"Off", "On"}, {""});
|
||||
Option StartingSongOfStorms = Option::U8 ("Song of Storms", {"Off", "On"}, {""});
|
||||
Option StartingMinuetOfForest = Option::U8 ("Minuet of Forest", {"Off", "On"}, {""});
|
||||
Option StartingBoleroOfFire = Option::U8 ("Bolero of Fire", {"Off", "On"}, {""});
|
||||
Option StartingSerenadeOfWater = Option::U8 ("Serenade of Water", {"Off", "On"}, {""});
|
||||
Option StartingRequiemOfSpirit = Option::U8 ("Requiem of Spirit", {"Off", "On"}, {""});
|
||||
Option StartingNocturneOfShadow = Option::U8 ("Nocturne of Shadow", {"Off", "On"}, {""});
|
||||
Option StartingPreludeOfLight = Option::U8 ("Prelude of Light", {"Off", "On"}, {""});
|
||||
Option StartingZeldasLullaby = Option::U8 ("Start with Zelda's Lullaby", {"Off", "On"}, {""});
|
||||
Option StartingEponasSong = Option::U8 ("Start with Epona's Song", {"Off", "On"}, {""});
|
||||
Option StartingSariasSong = Option::U8 ("Start with Saria's Song", {"Off", "On"}, {""});
|
||||
Option StartingSunsSong = Option::U8 ("Start with Sun's Song", {"Off", "On"}, {""});
|
||||
Option StartingSongOfTime = Option::U8 ("Start with Song of Time", {"Off", "On"}, {""});
|
||||
Option StartingSongOfStorms = Option::U8 ("Start with Song of Storms", {"Off", "On"}, {""});
|
||||
Option StartingMinuetOfForest = Option::U8 ("Start with Minuet of Forest", {"Off", "On"}, {""});
|
||||
Option StartingBoleroOfFire = Option::U8 ("Start with Bolero of Fire", {"Off", "On"}, {""});
|
||||
Option StartingSerenadeOfWater = Option::U8 ("Start with Serenade of Water", {"Off", "On"}, {""});
|
||||
Option StartingRequiemOfSpirit = Option::U8 ("Start with Requiem of Spirit", {"Off", "On"}, {""});
|
||||
Option StartingNocturneOfShadow = Option::U8 ("Start with Nocturne of Shadow", {"Off", "On"}, {""});
|
||||
Option StartingPreludeOfLight = Option::U8 ("Start with Prelude of Light", {"Off", "On"}, {""});
|
||||
std::vector<Option *> startingSongsOptions = {
|
||||
&StartingZeldasLullaby,
|
||||
&StartingEponasSong,
|
||||
@ -2703,6 +2703,19 @@ namespace Settings {
|
||||
|
||||
MapsAndCompasses.SetSelectedIndex(cvarSettings[RSK_STARTING_MAPS_COMPASSES]);
|
||||
|
||||
StartingZeldasLullaby.SetSelectedIndex(cvarSettings[RSK_STARTING_ZELDAS_LULLABY]);
|
||||
StartingEponasSong.SetSelectedIndex(cvarSettings[RSK_STARTING_EPONAS_SONG]);
|
||||
StartingSariasSong.SetSelectedIndex(cvarSettings[RSK_STARTING_SARIAS_SONG]);
|
||||
StartingSunsSong.SetSelectedIndex(cvarSettings[RSK_STARTING_SUNS_SONG]);
|
||||
StartingSongOfTime.SetSelectedIndex(cvarSettings[RSK_STARTING_SONG_OF_TIME]);
|
||||
StartingSongOfStorms.SetSelectedIndex(cvarSettings[RSK_STARTING_SONG_OF_STORMS]);
|
||||
StartingMinuetOfForest.SetSelectedIndex(cvarSettings[RSK_STARTING_MINUET_OF_FOREST]);
|
||||
StartingBoleroOfFire.SetSelectedIndex(cvarSettings[RSK_STARTING_BOLERO_OF_FIRE]);
|
||||
StartingSerenadeOfWater.SetSelectedIndex(cvarSettings[RSK_STARTING_SERENADE_OF_WATER]);
|
||||
StartingRequiemOfSpirit.SetSelectedIndex(cvarSettings[RSK_STARTING_REQUIEM_OF_SPIRIT]);
|
||||
StartingNocturneOfShadow.SetSelectedIndex(cvarSettings[RSK_STARTING_NOCTURNE_OF_SHADOW]);
|
||||
StartingPreludeOfLight.SetSelectedIndex(cvarSettings[RSK_STARTING_PRELUDE_OF_LIGHT]);
|
||||
|
||||
// RANDOTODO: Implement disabling ammo drops. Currently only "On" (index 0) or "On + Bombchus" (index 1) is implemented.
|
||||
AmmoDrops.SetSelectedIndex(cvarSettings[RSK_ENABLE_BOMBCHU_DROPS]);
|
||||
|
||||
|
@ -435,6 +435,26 @@ static void WriteStartingInventory() {
|
||||
&Settings::startingOthersOptions
|
||||
};
|
||||
|
||||
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() == "Start with Zelda's Lullaby" ||
|
||||
setting->GetName() == "Start with Epona's Song" ||
|
||||
setting->GetName() == "Start with Saria's Song" ||
|
||||
setting->GetName() == "Start with Sun's Song" ||
|
||||
setting->GetName() == "Start with Song of Time" ||
|
||||
setting->GetName() == "Start with Song of Storms" ||
|
||||
setting->GetName() == "Start with Minuet of Forest" ||
|
||||
setting->GetName() == "Start with Bolero of Fire" ||
|
||||
setting->GetName() == "Start with Serenade of Water" ||
|
||||
setting->GetName() == "Start with Requiem of Spirit" ||
|
||||
setting->GetName() == "Start with Nocturne of Shadow" ||
|
||||
setting->GetName() == "Start with Prelude of Light") {
|
||||
jsonData["settings"][setting->GetName()] = setting->GetSelectedOptionText();
|
||||
}
|
||||
}
|
||||
}
|
||||
for (std::vector<Option *>* menu : startingInventoryOptions) {
|
||||
for (size_t i = 0; i < menu->size(); ++i) {
|
||||
const auto setting = menu->at(i);
|
||||
|
@ -208,6 +208,18 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
|
||||
{ "Start with Deku Shield", RSK_STARTING_DEKU_SHIELD },
|
||||
{ "Start with Kokiri Sword", RSK_STARTING_KOKIRI_SWORD },
|
||||
{ "Start with Fairy Ocarina", RSK_STARTING_OCARINA },
|
||||
{ "Start with Zelda's Lullaby", RSK_STARTING_ZELDAS_LULLABY },
|
||||
{ "Start with Epona's Song", RSK_STARTING_EPONAS_SONG },
|
||||
{ "Start with Saria's Song", RSK_STARTING_SARIAS_SONG },
|
||||
{ "Start with Sun's Song", RSK_STARTING_SUNS_SONG },
|
||||
{ "Start with Song of Time", RSK_STARTING_SONG_OF_TIME },
|
||||
{ "Start with Song of Storms", RSK_STARTING_SONG_OF_STORMS },
|
||||
{ "Start with Minuet of Forest", RSK_STARTING_MINUET_OF_FOREST },
|
||||
{ "Start with Bolero of Fire", RSK_STARTING_BOLERO_OF_FIRE },
|
||||
{ "Start with Serenade of Water", RSK_STARTING_SERENADE_OF_WATER },
|
||||
{ "Start with Requiem of Spirit", RSK_STARTING_REQUIEM_OF_SPIRIT },
|
||||
{ "Start with Nocturne of Shadow", RSK_STARTING_NOCTURNE_OF_SHADOW },
|
||||
{ "Start with Prelude of Light", RSK_STARTING_PRELUDE_OF_LIGHT },
|
||||
{ "Shuffle Dungeon Items:Maps/Compasses", RSK_STARTING_MAPS_COMPASSES },
|
||||
{ "Shuffle Dungeon Items:Small Keys", RSK_KEYSANITY },
|
||||
{ "Shuffle Dungeon Items:Gerudo Fortress Keys", RSK_GERUDO_KEYS },
|
||||
@ -674,6 +686,18 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
|
||||
case RSK_RANDOM_MQ_DUNGEONS:
|
||||
case RSK_STARTING_DEKU_SHIELD:
|
||||
case RSK_STARTING_KOKIRI_SWORD:
|
||||
case RSK_STARTING_ZELDAS_LULLABY:
|
||||
case RSK_STARTING_EPONAS_SONG:
|
||||
case RSK_STARTING_SARIAS_SONG:
|
||||
case RSK_STARTING_SUNS_SONG:
|
||||
case RSK_STARTING_SONG_OF_TIME:
|
||||
case RSK_STARTING_SONG_OF_STORMS:
|
||||
case RSK_STARTING_MINUET_OF_FOREST:
|
||||
case RSK_STARTING_BOLERO_OF_FIRE:
|
||||
case RSK_STARTING_SERENADE_OF_WATER:
|
||||
case RSK_STARTING_REQUIEM_OF_SPIRIT:
|
||||
case RSK_STARTING_NOCTURNE_OF_SHADOW:
|
||||
case RSK_STARTING_PRELUDE_OF_LIGHT:
|
||||
case RSK_COMPLETE_MASK_QUEST:
|
||||
case RSK_SKIP_SCARECROWS_SONG:
|
||||
case RSK_ENABLE_GLITCH_CUTSCENES:
|
||||
@ -2670,6 +2694,18 @@ void GenerateRandomizerImgui() {
|
||||
cvarSettings[RSK_SHUFFLE_KOKIRI_SWORD] = CVarGetInteger("gRandomizeShuffleKokiriSword", 0) ||
|
||||
CVarGetInteger("gRandomizeStartingKokiriSword", 0);
|
||||
cvarSettings[RSK_STARTING_DEKU_SHIELD] = CVarGetInteger("gRandomizeStartingDekuShield", 0);
|
||||
cvarSettings[RSK_STARTING_ZELDAS_LULLABY] = CVarGetInteger("gRandomizeStartingZeldasLullaby", 0);
|
||||
cvarSettings[RSK_STARTING_EPONAS_SONG] = CVarGetInteger("gRandomizeStartingEponasSong", 0);
|
||||
cvarSettings[RSK_STARTING_SARIAS_SONG] = CVarGetInteger("gRandomizeStartingSariasSong", 0);
|
||||
cvarSettings[RSK_STARTING_SUNS_SONG] = CVarGetInteger("gRandomizeStartingSunsSong", 0);
|
||||
cvarSettings[RSK_STARTING_SONG_OF_TIME] = CVarGetInteger("gRandomizeStartingSongOfTime", 0);
|
||||
cvarSettings[RSK_STARTING_SONG_OF_STORMS] = CVarGetInteger("gRandomizeStartingSongOfStorms", 0);
|
||||
cvarSettings[RSK_STARTING_MINUET_OF_FOREST] = CVarGetInteger("gRandomizeStartingMinuetOfForest", 0);
|
||||
cvarSettings[RSK_STARTING_BOLERO_OF_FIRE] = CVarGetInteger("gRandomizeStartingBoleroOfFire", 0);
|
||||
cvarSettings[RSK_STARTING_SERENADE_OF_WATER] = CVarGetInteger("gRandomizeStartingSerenadeOfWater", 0);
|
||||
cvarSettings[RSK_STARTING_REQUIEM_OF_SPIRIT] = CVarGetInteger("gRandomizeStartingRequiemOfSpirit", 0);
|
||||
cvarSettings[RSK_STARTING_NOCTURNE_OF_SHADOW] = CVarGetInteger("gRandomizeStartingNocturneOfShadow", 0);
|
||||
cvarSettings[RSK_STARTING_PRELUDE_OF_LIGHT] = CVarGetInteger("gRandomizeStartingPreludeOfLight", 0);
|
||||
cvarSettings[RSK_STARTING_SKULLTULA_TOKEN] = CVarGetInteger("gRandomizeStartingSkulltulaToken", 0);
|
||||
cvarSettings[RSK_STARTING_MAPS_COMPASSES] = CVarGetInteger("gRandomizeStartingMapsCompasses", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||
cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS] = CVarGetInteger("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON);
|
||||
@ -4183,7 +4219,44 @@ void DrawRandoEditor(bool& open) {
|
||||
window->DC.CurrLineTextBaseOffset = 0.0f;
|
||||
ImGui::BeginChild("ChildStartingSongs", ImVec2(0, -8));
|
||||
|
||||
ImGui::Text("Coming soon");
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingZeldasLullaby.GetName().c_str(),
|
||||
"gRandomizeStartingZeldasLullaby");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingEponasSong.GetName().c_str(),
|
||||
"gRandomizeStartingEponasSong");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingSariasSong.GetName().c_str(),
|
||||
"gRandomizeStartingSariasSong");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingSunsSong.GetName().c_str(),
|
||||
"gRandomizeStartingSunsSong");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingSongOfTime.GetName().c_str(),
|
||||
"gRandomizeStartingSongOfTime");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingSongOfStorms.GetName().c_str(),
|
||||
"gRandomizeStartingSongOfStorms");
|
||||
UIWidgets::PaddedSeparator();
|
||||
ImGui::Text("Warp Songs");
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingMinuetOfForest.GetName().c_str(),
|
||||
"gRandomizeStartingMinuetOfForest");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingBoleroOfFire.GetName().c_str(),
|
||||
"gRandomizeStartingBoleroOfFire");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingSerenadeOfWater.GetName().c_str(),
|
||||
"gRandomizeStartingSerenadeOfWater");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingRequiemOfSpirit.GetName().c_str(),
|
||||
"gRandomizeStartingRequiemOfSpirit");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingNocturneOfShadow.GetName().c_str(),
|
||||
"gRandomizeStartingNocturneOfShadow");
|
||||
|
||||
UIWidgets::EnhancementCheckbox(Settings::StartingPreludeOfLight.GetName().c_str(),
|
||||
"gRandomizeStartingPreludeOfLight");
|
||||
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
||||
|
@ -993,6 +993,18 @@ typedef enum {
|
||||
RSK_SHUFFLE_OCARINA,
|
||||
RSK_STARTING_DEKU_SHIELD,
|
||||
RSK_STARTING_KOKIRI_SWORD,
|
||||
RSK_STARTING_ZELDAS_LULLABY,
|
||||
RSK_STARTING_EPONAS_SONG,
|
||||
RSK_STARTING_SARIAS_SONG,
|
||||
RSK_STARTING_SUNS_SONG,
|
||||
RSK_STARTING_SONG_OF_TIME,
|
||||
RSK_STARTING_SONG_OF_STORMS,
|
||||
RSK_STARTING_MINUET_OF_FOREST,
|
||||
RSK_STARTING_BOLERO_OF_FIRE,
|
||||
RSK_STARTING_SERENADE_OF_WATER,
|
||||
RSK_STARTING_REQUIEM_OF_SPIRIT,
|
||||
RSK_STARTING_NOCTURNE_OF_SHADOW,
|
||||
RSK_STARTING_PRELUDE_OF_LIGHT,
|
||||
RSK_SHUFFLE_KOKIRI_SWORD,
|
||||
RSK_STARTING_MAPS_COMPASSES,
|
||||
RSK_SHUFFLE_DUNGEON_REWARDS,
|
||||
|
@ -409,6 +409,19 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
if(Randomizer_GetSettingValue(RSK_STARTING_KOKIRI_SWORD)) Item_Give(NULL, ITEM_SWORD_KOKIRI);
|
||||
if(Randomizer_GetSettingValue(RSK_STARTING_DEKU_SHIELD)) Item_Give(NULL, ITEM_SHIELD_DEKU);
|
||||
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_ZELDAS_LULLABY)) Item_Give(NULL, ITEM_SONG_LULLABY);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_EPONAS_SONG)) Item_Give(NULL, ITEM_SONG_EPONA);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_SARIAS_SONG)) Item_Give(NULL, ITEM_SONG_SARIA);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_SUNS_SONG)) Item_Give(NULL, ITEM_SONG_SUN);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_SONG_OF_TIME)) Item_Give(NULL, ITEM_SONG_TIME);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_SONG_OF_STORMS)) Item_Give(NULL, ITEM_SONG_STORMS);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_MINUET_OF_FOREST)) Item_Give(NULL, ITEM_SONG_MINUET);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_BOLERO_OF_FIRE)) Item_Give(NULL, ITEM_SONG_BOLERO);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_SERENADE_OF_WATER)) Item_Give(NULL, ITEM_SONG_SERENADE);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_REQUIEM_OF_SPIRIT)) Item_Give(NULL, ITEM_SONG_REQUIEM);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_NOCTURNE_OF_SHADOW)) Item_Give(NULL, ITEM_SONG_NOCTURNE);
|
||||
if (Randomizer_GetSettingValue(RSK_STARTING_PRELUDE_OF_LIGHT)) Item_Give(NULL, ITEM_SONG_PRELUDE);
|
||||
|
||||
if(Randomizer_GetSettingValue(RSK_STARTING_SKULLTULA_TOKEN)) {
|
||||
gSaveContext.inventory.questItems |= gBitFlags[QUEST_SKULL_TOKEN];
|
||||
gSaveContext.inventory.gsTokens = Randomizer_GetSettingValue(RSK_STARTING_SKULLTULA_TOKEN);
|
||||
|
Loading…
Reference in New Issue
Block a user