mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-22 21:51:55 -05:00
Merge branch 'get-item-rework' into merge-fix
This commit is contained in:
commit
e12fda29fe
@ -549,14 +549,6 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
|
||||
{ "Timesaver Settings:Enable Glitch-Useful Cutscenes", RSK_ENABLE_GLITCH_CUTSCENES },
|
||||
};
|
||||
|
||||
s32 Randomizer::GetItemIDFromGetItemID(s32 getItemId) {
|
||||
if (getItemIdToItemId.count(getItemId) == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return getItemIdToItemId[getItemId];
|
||||
}
|
||||
|
||||
std::string sanitize(std::string stringValue) {
|
||||
// Add backslashes.
|
||||
for (auto i = stringValue.begin();;) {
|
||||
@ -2680,7 +2672,8 @@ void DrawRandoEditor(bool& open) {
|
||||
const char* randoDoorOfTime[3] = { "Closed", "Song only", "Open" };
|
||||
const char* randoZorasFountain[3] = { "Closed", "Closed as child", "Open" };
|
||||
const char* randoGerudoFortress[3] = { "Normal", "Fast", "Open" };
|
||||
const char* randoRainbowBridge[7] = { "Vanilla", "Always open", "Stones", "Medallions", "Dungeon rewards", "Dungeons", "Tokens" };
|
||||
const char* randoRainbowBridge[7] = { "Vanilla", "Always open", "Stones", "Medallions",
|
||||
"Dungeon rewards", "Dungeons", "Tokens" };
|
||||
const char* randoGanonsTrial[2] = { "Off", "On" };
|
||||
|
||||
// World Settings
|
||||
@ -2713,11 +2706,15 @@ void DrawRandoEditor(bool& open) {
|
||||
const char* randoShuffleAdultTrade[2] = { "Off", "On" };
|
||||
|
||||
// Shuffle Dungeon Items Settings
|
||||
const char* randoShuffleMapsAndCompasses[6] = { "Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere" };
|
||||
const char* randoShuffleSmallKeys[6] = { "Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere" };
|
||||
const char* randoShuffleMapsAndCompasses[6] = { "Start With", "Vanilla", "Own Dungeon",
|
||||
"Any Dungeon", "Overworld", "Anywhere" };
|
||||
const char* randoShuffleSmallKeys[6] = { "Start With", "Vanilla", "Own Dungeon",
|
||||
"Any Dungeon", "Overworld", "Anywhere" };
|
||||
const char* randoShuffleGerudoFortressKeys[4] = { "Vanilla", "Any Dungeon", "Overworld", "Anywhere" };
|
||||
const char* randoShuffleBossKeys[6] = { "Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere" };
|
||||
const char* randoShuffleGanonsBossKey[6] = { "Vanilla", "Own dungeon", "Start with", "Any Dungeon", "Overworld", "Anywhere" };
|
||||
const char* randoShuffleBossKeys[6] = { "Start With", "Vanilla", "Own Dungeon",
|
||||
"Any Dungeon", "Overworld", "Anywhere" };
|
||||
const char* randoShuffleGanonsBossKey[6] = { "Vanilla", "Own dungeon", "Start with",
|
||||
"Any Dungeon", "Overworld", "Anywhere" };
|
||||
|
||||
// Timesaver Settings
|
||||
const char* randoSkipSongReplays[3] = { "Don't skip", "Skip (no SFX)", "Skip (Keep SFX)" };
|
||||
@ -2890,8 +2887,7 @@ void DrawRandoEditor(bool& open) {
|
||||
|
||||
bool disableEditingRandoSettings = CVar_GetS32("gRandoGenerating", 0) || CVar_GetS32("gOnFileSelectNameEntry", 0);
|
||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, disableEditingRandoSettings);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha,
|
||||
ImGui::GetStyle().Alpha * (disableEditingRandoSettings ? 0.5f : 1.0f));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * (disableEditingRandoSettings ? 0.5f : 1.0f));
|
||||
SohImGui::EnhancementCheckbox("Enable Randomizer", "gRandomizer");
|
||||
|
||||
if (CVar_GetS32("gRandomizer", 0) == 1) {
|
||||
@ -2914,7 +2910,8 @@ void DrawRandoEditor(bool& open) {
|
||||
ImGuiWindow* window = ImGui::GetCurrentWindow();
|
||||
static ImVec2 cellPadding(8.0f, 8.0f);
|
||||
|
||||
if (CVar_GetS32("gRandomizer", 0) == 1 && ImGui::BeginTabBar("Randomizer Settings", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
|
||||
if (CVar_GetS32("gRandomizer", 0) == 1 &&
|
||||
ImGui::BeginTabBar("Randomizer Settings", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
|
||||
if (ImGui::BeginTabItem("Main Rules")) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
|
||||
if (ImGui::BeginTable("tableRandoMainRules", 3, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
|
||||
@ -2934,8 +2931,7 @@ void DrawRandoEditor(bool& open) {
|
||||
if (CVar_GetS32("gRandomizeAllOpenSettings", 0) != 1) {
|
||||
// Forest
|
||||
ImGui::Text(Settings::OpenForest.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Closed - Kokiri sword & shield are required to access "
|
||||
InsertHelpHoverText("Closed - Kokiri sword & shield are required to access "
|
||||
"the Deku Tree, and completing the Deku Tree is required to "
|
||||
"access the Hyrule Field exit.\n"
|
||||
"\n"
|
||||
@ -2949,34 +2945,29 @@ void DrawRandoEditor(bool& open) {
|
||||
PaddedSeparator();
|
||||
// Kakariko Gate
|
||||
ImGui::Text(Settings::OpenKakariko.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Closed - The gate will remain closed until Zelda's letter "
|
||||
InsertHelpHoverText("Closed - The gate will remain closed until Zelda's letter "
|
||||
"is shown to the guard.\n"
|
||||
"\n"
|
||||
"Open - The gate is always open. The happy mask shop "
|
||||
"will open immediately after obtaining Zelda's letter."
|
||||
);
|
||||
"will open immediately after obtaining Zelda's letter.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeKakarikoGate", randoKakarikoGate, 2, 0);
|
||||
PaddedSeparator();
|
||||
|
||||
// Door of Time
|
||||
ImGui::Text(Settings::OpenDoorOfTime.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Closed - The Ocarina of Time, the Song of Time and all "
|
||||
InsertHelpHoverText("Closed - The Ocarina of Time, the Song of Time and all "
|
||||
"three spiritual stones are required to open the Door of Time.\n"
|
||||
"\n"
|
||||
"Song only - Play the Song of Time in front of the Door of "
|
||||
"Time to open it.\n"
|
||||
"\n"
|
||||
"Open - The Door of Time is permanently open with no requirements."
|
||||
);
|
||||
"Open - The Door of Time is permanently open with no requirements.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeDoorOfTime", randoDoorOfTime, 3, 0);
|
||||
PaddedSeparator();
|
||||
|
||||
// Zora's Fountain
|
||||
ImGui::Text(Settings::ZorasFountain.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Closed - King Zora obstructs the way to Zora's Fountain. "
|
||||
InsertHelpHoverText("Closed - King Zora obstructs the way to Zora's Fountain. "
|
||||
"Ruto's letter must be shown as child Link in order to move "
|
||||
"him in both time periods.\n"
|
||||
"\n"
|
||||
@ -2984,30 +2975,26 @@ void DrawRandoEditor(bool& open) {
|
||||
"as child Link. Zora's Fountain starts open as adult.\n"
|
||||
"\n"
|
||||
"Open - King Zora has already mweeped out of the way in both "
|
||||
"time periods. Ruto's Letter is removed from the item pool."
|
||||
);
|
||||
"time periods. Ruto's Letter is removed from the item pool.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeZorasFountain", randoZorasFountain, 3, 0);
|
||||
PaddedSeparator();
|
||||
|
||||
// Gerudo Fortress
|
||||
ImGui::Text(Settings::GerudoFortress.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Sets the amount of carpenters required to repair the bridge "
|
||||
InsertHelpHoverText("Sets the amount of carpenters required to repair the bridge "
|
||||
"in Gerudo Valley.\n"
|
||||
"\n"
|
||||
"Normal - All 4 carpenters are required to be saved.\n"
|
||||
"\n"
|
||||
"Fast - Only the bottom left carpenter requires rescuing.\n"
|
||||
"\n"
|
||||
"Open - The bridge is repaired from the start."
|
||||
);
|
||||
"Open - The bridge is repaired from the start.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeGerudoFortress", randoGerudoFortress, 3, 0);
|
||||
PaddedSeparator();
|
||||
|
||||
// Rainbow Bridge
|
||||
ImGui::Text(Settings::Bridge.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Alters the requirements to open the bridge to Ganon's Castle.\n"
|
||||
InsertHelpHoverText("Alters the requirements to open the bridge to Ganon's Castle.\n"
|
||||
"\n"
|
||||
"Vanilla - Obtain the Shadow Medallion, Spirit Medallion and Light Arrows.\n"
|
||||
"\n"
|
||||
@ -3024,8 +3011,7 @@ void DrawRandoEditor(bool& open) {
|
||||
"are considered complete after stepping in to the blue warp after "
|
||||
"the boss.\n"
|
||||
"\n"
|
||||
"Tokens - Obtain the specified amount of Skulltula tokens."
|
||||
);
|
||||
"Tokens - Obtain the specified amount of Skulltula tokens.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeRainbowBridge", randoRainbowBridge, 7, 0);
|
||||
ImGui::PopItemWidth();
|
||||
switch (CVar_GetS32("gRandomizeRainbowBridge", 0)) {
|
||||
@ -3097,16 +3083,14 @@ void DrawRandoEditor(bool& open) {
|
||||
" - Bottom of the Well Lens of Truth location\n"
|
||||
" - Gerudo Training Ground's Ice Arrows location\n"
|
||||
"\n"
|
||||
"Anywhere - Songs can appear at any location."
|
||||
);
|
||||
"Anywhere - Songs can appear at any location.");
|
||||
|
||||
SohImGui::EnhancementCombobox("gRandomizeShuffleSongs", randoShuffleSongs, 3, 0);
|
||||
PaddedSeparator();
|
||||
|
||||
// Shuffle Tokens
|
||||
ImGui::Text(Settings::Tokensanity.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Shuffles Golden Skulltula Tokens into the item pool. This means "
|
||||
InsertHelpHoverText("Shuffles Golden Skulltula Tokens into the item pool. This means "
|
||||
"Golden Skulltulas can contain other items as well.\n"
|
||||
"\n"
|
||||
"Off - GS tokens will not be shuffled.\n"
|
||||
@ -3115,8 +3099,7 @@ void DrawRandoEditor(bool& open) {
|
||||
"\n"
|
||||
"Overworld - Only shuffle GS tokens that are outside of dungeons.\n"
|
||||
"\n"
|
||||
"All Tokens - Shuffle all 100 GS tokens."
|
||||
);
|
||||
"All Tokens - Shuffle all 100 GS tokens.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeShuffleTokens", randoShuffleTokens, 4, 0);
|
||||
PaddedSeparator();
|
||||
|
||||
@ -3127,42 +3110,41 @@ void DrawRandoEditor(bool& open) {
|
||||
|
||||
// Shuffle Cows
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleCows.GetName().c_str(), "gRandomizeShuffleCows");
|
||||
InsertHelpHoverText("Cows give a randomized item from the pool upon performing Epona's Song in front of them.");
|
||||
InsertHelpHoverText(
|
||||
"Cows give a randomized item from the pool upon performing Epona's Song in front of them.");
|
||||
PaddedSeparator();
|
||||
|
||||
// Shuffle Adult Trade Quest
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleAdultTradeQuest.GetName().c_str(), "gRandomizeShuffleAdultTrade");
|
||||
InsertHelpHoverText(
|
||||
"Adds all of the adult trade quest items into the pool, each of which "
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleAdultTradeQuest.GetName().c_str(),
|
||||
"gRandomizeShuffleAdultTrade");
|
||||
InsertHelpHoverText("Adds all of the adult trade quest items into the pool, each of which "
|
||||
"can be traded for a unique reward.\n"
|
||||
"\n"
|
||||
"You will be able to choose which of your owned adult trade items is visible "
|
||||
"in the inventory by selecting the item with A and using the control stick or "
|
||||
"D-pad.\n"
|
||||
"\n"
|
||||
"If disabled, only the Claim Check will be found in the pool."
|
||||
);
|
||||
"If disabled, only the Claim Check will be found in the pool.");
|
||||
PaddedSeparator();
|
||||
|
||||
if (CVar_GetS32("gRandomizeStartingKokiriSword", 0) == 0) {
|
||||
// Shuffle Kokiri Sword
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleKokiriSword.GetName().c_str(), "gRandomizeShuffleKokiriSword");
|
||||
InsertHelpHoverText(
|
||||
"Shuffles the Kokiri Sword into the item pool.\n"
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleKokiriSword.GetName().c_str(),
|
||||
"gRandomizeShuffleKokiriSword");
|
||||
InsertHelpHoverText("Shuffles the Kokiri Sword into the item pool.\n"
|
||||
"\n"
|
||||
"This will require the use of sticks until the Kokiri Sword is found."
|
||||
);
|
||||
"This will require the use of sticks until the Kokiri Sword is found.");
|
||||
PaddedSeparator();
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gRandomizeStartingOcarina", 0) == 0) {
|
||||
// Shuffle Ocarinas
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleOcarinas.GetName().c_str(), "gRandomizeShuffleOcarinas");
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleOcarinas.GetName().c_str(),
|
||||
"gRandomizeShuffleOcarinas");
|
||||
InsertHelpHoverText(
|
||||
"Enabling this shuffles the Fairy Ocarina and the Ocarina of Time into the item pool.\n"
|
||||
"\n"
|
||||
"This will require finding an Ocarina before being able to play songs."
|
||||
);
|
||||
"This will require finding an Ocarina before being able to play songs.");
|
||||
PaddedSeparator();
|
||||
}
|
||||
|
||||
@ -3174,18 +3156,17 @@ void DrawRandoEditor(bool& open) {
|
||||
ImGui::GetStyle().Alpha *
|
||||
(CVar_GetS32("gRandomizeSkipChildZelda", 0) ? 0.5f : 1.0f));
|
||||
}
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleWeirdEgg.GetName().c_str(), "gRandomizeShuffleWeirdEgg");
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleWeirdEgg.GetName().c_str(),
|
||||
"gRandomizeShuffleWeirdEgg");
|
||||
if (!disableEditingRandoSettings) {
|
||||
ImGui::PopStyleVar();
|
||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) &&
|
||||
CVar_GetS32("gRandomizeSkipChildZelda", 0)) {
|
||||
ImGui::SetTooltip("%s",
|
||||
"This option is disabled because \"Skip Child Zelda\" is enabled");
|
||||
ImGui::SetTooltip("%s", "This option is disabled because \"Skip Child Zelda\" is enabled");
|
||||
}
|
||||
ImGui::PopItemFlag();
|
||||
}
|
||||
InsertHelpHoverText(
|
||||
"Shuffles the Weird Egg from Malon in to the item pool. Enabling "
|
||||
InsertHelpHoverText("Shuffles the Weird Egg from Malon in to the item pool. Enabling "
|
||||
"\"Skip Child Zelda\" disables this feature.\n"
|
||||
"\n"
|
||||
"The Weird Egg is required to unlock several events:\n"
|
||||
@ -3193,29 +3174,26 @@ void DrawRandoEditor(bool& open) {
|
||||
" - Saria's song in Sacred Forest Meadow\n"
|
||||
" - Epona's song and chicken minigame at Lon Lon Ranch\n"
|
||||
" - Zelda's letter for Kakariko gate (if set to closed)\n"
|
||||
" - Happy Mask Shop sidequest\n"
|
||||
);
|
||||
" - Happy Mask Shop sidequest\n");
|
||||
PaddedSeparator();
|
||||
|
||||
// Shuffle Gerudo Membership Card
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleGerudoToken.GetName().c_str(), "gRandomizeShuffleGerudoToken");
|
||||
InsertHelpHoverText(
|
||||
"Shuffles the Gerudo Membership Card into the item pool.\n"
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleGerudoToken.GetName().c_str(),
|
||||
"gRandomizeShuffleGerudoToken");
|
||||
InsertHelpHoverText("Shuffles the Gerudo Membership Card into the item pool.\n"
|
||||
"\n"
|
||||
"The Gerudo Card is required to enter the Gerudo Training Grounds, opening "
|
||||
"the gate to Haunted Wasteland and the Horseback Archery minigame."
|
||||
);
|
||||
"the gate to Haunted Wasteland and the Horseback Archery minigame.");
|
||||
PaddedSeparator();
|
||||
|
||||
// Shuffle Frog Song Rupees
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleFrogSongRupees.GetName().c_str(), "gRandomizeShuffleFrogSongRupees");
|
||||
InsertHelpHoverText(
|
||||
"Shuffles 5 Purple Rupees into to the item pool, and allows\n"
|
||||
SohImGui::EnhancementCheckbox(Settings::ShuffleFrogSongRupees.GetName().c_str(),
|
||||
"gRandomizeShuffleFrogSongRupees");
|
||||
InsertHelpHoverText("Shuffles 5 Purple Rupees into to the item pool, and allows\n"
|
||||
"you to earn items by playing songs at the Frog Choir.\n"
|
||||
"\n"
|
||||
"This setting does not effect the item earned from playing\n"
|
||||
"the Song of Storms and the frog song minigame."
|
||||
);
|
||||
"the Song of Storms and the frog song minigame.");
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
@ -3236,15 +3214,13 @@ void DrawRandoEditor(bool& open) {
|
||||
"\n"
|
||||
"Overworld - Spiritual stones and medallions can only be found outside of dungeons.\n"
|
||||
"\n"
|
||||
"Anywhere - Spiritual stones and medallions can appear anywhere."
|
||||
);
|
||||
"Anywhere - Spiritual stones and medallions can appear anywhere.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeShuffleDungeonReward", randoShuffleDungeonRewards, 4, 0);
|
||||
PaddedSeparator();
|
||||
|
||||
// Maps & Compasses
|
||||
ImGui::Text(Settings::MapsAndCompasses.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Start with - You will start with Maps & Compasses from all dungeons.\n"
|
||||
InsertHelpHoverText("Start with - You will start with Maps & Compasses from all dungeons.\n"
|
||||
"\n"
|
||||
"Vanilla - Maps & Compasses will appear in their vanilla locations.\n"
|
||||
"\n"
|
||||
@ -3254,15 +3230,13 @@ void DrawRandoEditor(bool& open) {
|
||||
"\n"
|
||||
"Overworld - Maps & Compasses can only appear outside of dungeons.\n"
|
||||
"\n"
|
||||
"Anywhere - Maps & Compasses can appear anywhere in the world."
|
||||
);
|
||||
"Anywhere - Maps & Compasses can appear anywhere in the world.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeStartingMapsCompasses", randoShuffleMapsAndCompasses, 6, 2);
|
||||
PaddedSeparator();
|
||||
|
||||
// Keysanity
|
||||
ImGui::Text(Settings::Keysanity.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Start with - You will start with all Small Keys from all dungeons.\n"
|
||||
InsertHelpHoverText("Start with - You will start with all Small Keys from all dungeons.\n"
|
||||
"\n"
|
||||
"Vanilla - Small Keys will appear in their vanilla locations.\n"
|
||||
"\n"
|
||||
@ -3272,29 +3246,25 @@ void DrawRandoEditor(bool& open) {
|
||||
"\n"
|
||||
"Overworld - Small Keys can only appear outside of dungeons.\n"
|
||||
"\n"
|
||||
"Anywhere - Small Keys can appear anywhere in the world."
|
||||
);
|
||||
"Anywhere - Small Keys can appear anywhere in the world.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeKeysanity", randoShuffleSmallKeys, 6, 2);
|
||||
PaddedSeparator();
|
||||
|
||||
// Gerudo Keys
|
||||
ImGui::Text(Settings::GerudoKeys.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Vanilla - Thieve's Hideout Keys will appear in their vanilla locations.\n"
|
||||
InsertHelpHoverText("Vanilla - Thieve's Hideout Keys will appear in their vanilla locations.\n"
|
||||
"\n"
|
||||
"Any dungeon - Thieve's Hideout Keys can only appear inside of any dungon.\n"
|
||||
"\n"
|
||||
"Overworld - Thieve's Hideout Keys can only appear outside of dungeons.\n"
|
||||
"\n"
|
||||
"Anywhere - Thieve's Hideout Keys can appear anywhere in the world."
|
||||
);
|
||||
"Anywhere - Thieve's Hideout Keys can appear anywhere in the world.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeGerudoKeys", randoShuffleGerudoFortressKeys, 4, 0);
|
||||
PaddedSeparator();
|
||||
|
||||
// Boss Keysanity
|
||||
ImGui::Text(Settings::BossKeysanity.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Start with - You will start with Boss keys from all dungeons.\n"
|
||||
InsertHelpHoverText("Start with - You will start with Boss keys from all dungeons.\n"
|
||||
"\n"
|
||||
"Vanilla - Boss Keys will appear in their vanilla locations.\n"
|
||||
"\n"
|
||||
@ -3304,15 +3274,13 @@ void DrawRandoEditor(bool& open) {
|
||||
"\n"
|
||||
"Overworld - Boss Keys can only appear outside of dungeons.\n"
|
||||
"\n"
|
||||
"Anywhere - Boss Keys can appear anywhere in the world."
|
||||
);
|
||||
"Anywhere - Boss Keys can appear anywhere in the world.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeBossKeysanity", randoShuffleBossKeys, 6, 2);
|
||||
PaddedSeparator();
|
||||
|
||||
// Ganon's Boss Key
|
||||
ImGui::Text(Settings::GanonsBossKey.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Vanilla - Ganon's Boss Key will appear in the vanilla location.\n"
|
||||
InsertHelpHoverText("Vanilla - Ganon's Boss Key will appear in the vanilla location.\n"
|
||||
"\n"
|
||||
"Own dungeon - Ganon's Boss Key can appear anywhere inside Ganon's Castle.\n"
|
||||
"\n"
|
||||
@ -3322,8 +3290,7 @@ void DrawRandoEditor(bool& open) {
|
||||
"\n"
|
||||
"Overworld - Ganon's Boss Key Key can only appear outside of dungeons.\n"
|
||||
"\n"
|
||||
"Anywhere - Ganon's Boss Key Key can appear anywhere in the world."
|
||||
);
|
||||
"Anywhere - Ganon's Boss Key Key can appear anywhere in the world.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey, 6, 1);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
@ -3351,17 +3318,13 @@ void DrawRandoEditor(bool& open) {
|
||||
// Cuccos to return
|
||||
SohImGui::EnhancementSliderInt("Cuccos to return: %d", "##RandoCuccosToReturn",
|
||||
"gRandomizeCuccosToReturn", 0, 7, "", 7, true);
|
||||
InsertHelpHoverText(
|
||||
"The amount of cuccos needed to claim the reward from Anju the cucco lady"
|
||||
);
|
||||
InsertHelpHoverText("The amount of cuccos needed to claim the reward from Anju the cucco lady");
|
||||
PaddedSeparator();
|
||||
|
||||
// Big Poe Target Count
|
||||
SohImGui::EnhancementSliderInt("Big Poe Target Count: %d", "##RandoBigPoeTargetCount",
|
||||
"gRandomizeBigPoeTargetCount", 1, 10, "", 10, true);
|
||||
InsertHelpHoverText(
|
||||
"The Poe collector will give a reward for turning in this many Big Poes."
|
||||
);
|
||||
InsertHelpHoverText("The Poe collector will give a reward for turning in this many Big Poes.");
|
||||
PaddedSeparator();
|
||||
|
||||
// Skip child stealth
|
||||
@ -3387,39 +3350,32 @@ void DrawRandoEditor(bool& open) {
|
||||
|
||||
// Skip child zelda
|
||||
SohImGui::EnhancementCheckbox("Skip Child Zelda", "gRandomizeSkipChildZelda");
|
||||
InsertHelpHoverText(
|
||||
"Start with Zelda's Letter in your inventory and skip the sequence up "
|
||||
"until after meeting Zelda. Disables the ability to shuffle Weird Egg."
|
||||
);
|
||||
InsertHelpHoverText("Start with Zelda's Letter in your inventory and skip the sequence up "
|
||||
"until after meeting Zelda. Disables the ability to shuffle Weird Egg.");
|
||||
PaddedSeparator();
|
||||
|
||||
// Skip Epona race
|
||||
SohImGui::EnhancementCheckbox(Settings::SkipEponaRace.GetName().c_str(), "gRandomizeSkipEponaRace");
|
||||
InsertHelpHoverText(
|
||||
"Epona can be summoned with Epona's Song without needing to race Ingo."
|
||||
);
|
||||
InsertHelpHoverText("Epona can be summoned with Epona's Song without needing to race Ingo.");
|
||||
PaddedSeparator();
|
||||
|
||||
// Skip tower escape
|
||||
SohImGui::EnhancementCheckbox(Settings::SkipTowerEscape.GetName().c_str(), "gRandomizeSkipTowerEscape");
|
||||
InsertHelpHoverText(
|
||||
"The tower escape sequence between Ganondorf and Ganon will be skipped."
|
||||
);
|
||||
InsertHelpHoverText("The tower escape sequence between Ganondorf and Ganon will be skipped.");
|
||||
PaddedSeparator();
|
||||
|
||||
// Complete mask quest
|
||||
SohImGui::EnhancementCheckbox(Settings::CompleteMaskQuest.GetName().c_str(), "gRandomizeCompleteMaskQuest");
|
||||
InsertHelpHoverText(
|
||||
"Once the happy mask shop is opened, all masks will be available to be borrowed."
|
||||
);
|
||||
SohImGui::EnhancementCheckbox(Settings::CompleteMaskQuest.GetName().c_str(),
|
||||
"gRandomizeCompleteMaskQuest");
|
||||
InsertHelpHoverText("Once the happy mask shop is opened, all masks will be available to be borrowed.");
|
||||
PaddedSeparator();
|
||||
|
||||
// Enable Glitch-Useful Cutscenes
|
||||
SohImGui::EnhancementCheckbox(Settings::EnableGlitchCutscenes.GetName().c_str(), "gRandomizeEnableGlitchCutscenes");
|
||||
SohImGui::EnhancementCheckbox(Settings::EnableGlitchCutscenes.GetName().c_str(),
|
||||
"gRandomizeEnableGlitchCutscenes");
|
||||
InsertHelpHoverText(
|
||||
"The cutscenes of the Poes in Forest Temple and Darunia in Fire Temple will not be skipped. "
|
||||
"These cutscenes are only useful for glitched gameplay and can be safely skipped otherwise."
|
||||
);
|
||||
"These cutscenes are only useful for glitched gameplay and can be safely skipped otherwise.");
|
||||
|
||||
// COLUMN 2 - HINT SETTINGS
|
||||
ImGui::TableNextColumn();
|
||||
@ -3439,8 +3395,7 @@ void DrawRandoEditor(bool& open) {
|
||||
"\n"
|
||||
"Need Stone of Agony - Hints are only available after obtaining the Stone of Agony.\n"
|
||||
"\n"
|
||||
"Need Mask of Truth - Hints are only available whilst wearing the Mask of Truth.\n"
|
||||
);
|
||||
"Need Mask of Truth - Hints are only available whilst wearing the Mask of Truth.\n");
|
||||
|
||||
SohImGui::EnhancementCombobox("gRandomizeGossipStoneHints", randoGossipStoneHints, 4, 1);
|
||||
if (CVar_GetS32("gRandomizeGossipStoneHints", 1) != 0) {
|
||||
@ -3448,8 +3403,7 @@ void DrawRandoEditor(bool& open) {
|
||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
||||
ImGui::Indent();
|
||||
ImGui::Text(Settings::ClearerHints.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Sets the difficulty of hints.\n"
|
||||
InsertHelpHoverText("Sets the difficulty of hints.\n"
|
||||
"\n"
|
||||
"Obscure - Hints are unique for each item, but the writing may be cryptic.\n"
|
||||
"Ex: Kokiri Sword > a butter knife\n"
|
||||
@ -3458,15 +3412,13 @@ void DrawRandoEditor(bool& open) {
|
||||
"Ex: Kokiri Sword > a sword\n"
|
||||
"\n"
|
||||
"Clear - Hints are clearly written and are unique for each item.\n"
|
||||
"Ex: Kokiri Sword > the Kokiri Sword"
|
||||
);
|
||||
"Ex: Kokiri Sword > the Kokiri Sword");
|
||||
SohImGui::EnhancementCombobox("gRandomizeHintClarity", randoHintClarity, 3, 2);
|
||||
|
||||
// Hint Distribution
|
||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
||||
ImGui::Text(Settings::HintDistribution.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Sets how many hints will be useful.\n"
|
||||
InsertHelpHoverText("Sets how many hints will be useful.\n"
|
||||
"\n"
|
||||
"Useless - Only junk hints.\n"
|
||||
"\n"
|
||||
@ -3474,8 +3426,7 @@ void DrawRandoEditor(bool& open) {
|
||||
"\n"
|
||||
"Strong - More useful hints.\n"
|
||||
"\n"
|
||||
"Very Strong - Many powerful hints."
|
||||
);
|
||||
"Very Strong - Many powerful hints.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeHintDistribution", randoHintDistribution, 4, 1);
|
||||
ImGui::Unindent();
|
||||
}
|
||||
@ -3486,8 +3437,7 @@ void DrawRandoEditor(bool& open) {
|
||||
window->DC.CurrLineTextBaseOffset = 0.0f;
|
||||
ImGui::PushItemWidth(-FLT_MIN);
|
||||
ImGui::Text(Settings::ItemPoolValue.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Sets how many major items appear in the item pool.\n"
|
||||
InsertHelpHoverText("Sets how many major items appear in the item pool.\n"
|
||||
"\n"
|
||||
"Plentiful - Extra major items are added to the pool.\n"
|
||||
"\n"
|
||||
@ -3495,15 +3445,13 @@ void DrawRandoEditor(bool& open) {
|
||||
"\n"
|
||||
"Scarce - Some excess items are removed, including health upgrades.\n"
|
||||
"\n"
|
||||
"Minimal - Most excess items are removed."
|
||||
);
|
||||
"Minimal - Most excess items are removed.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeItemPool", randoItemPool, 4, 1);
|
||||
PaddedSeparator();
|
||||
|
||||
// Ice Traps
|
||||
ImGui::Text(Settings::IceTrapValue.GetName().c_str());
|
||||
InsertHelpHoverText(
|
||||
"Sets how many items are replaced by ice traps.\n"
|
||||
InsertHelpHoverText("Sets how many items are replaced by ice traps.\n"
|
||||
"\n"
|
||||
"Off - No ice traps.\n"
|
||||
"\n"
|
||||
@ -3514,8 +3462,7 @@ void DrawRandoEditor(bool& open) {
|
||||
"Mayhem - All added junk items will be Ice Traps.\n"
|
||||
"\n"
|
||||
"Onslaught - All junk items will be replaced by Ice Traps, even those "
|
||||
"in the base pool."
|
||||
);
|
||||
"in the base pool.");
|
||||
SohImGui::EnhancementCombobox("gRandomizeIceTraps", randoIceTraps, 5, 1);
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::EndTable();
|
||||
@ -3539,8 +3486,7 @@ void DrawRandoEditor(bool& open) {
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::BeginTable("tableRandoLocations", 2,
|
||||
ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
|
||||
if (ImGui::BeginTable("tableRandoLocations", 2, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
|
||||
ImGui::TableSetupColumn("Included", ImGuiTableColumnFlags_WidthStretch, 200.0f);
|
||||
ImGui::TableSetupColumn("Excluded", ImGuiTableColumnFlags_WidthStretch, 200.0f);
|
||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
||||
@ -3559,8 +3505,7 @@ void DrawRandoEditor(bool& open) {
|
||||
for (auto areaIt : RandomizerCheckObjects::GetAllRCObjects()) {
|
||||
bool hasItems = false;
|
||||
for (auto locationIt : areaIt.second) {
|
||||
if (locationIt.visibleInImgui &&
|
||||
!excludedLocations.count(locationIt.rc) &&
|
||||
if (locationIt.visibleInImgui && !excludedLocations.count(locationIt.rc) &&
|
||||
locationSearch.PassFilter(locationIt.rcSpoilerName.c_str())) {
|
||||
|
||||
hasItems = true;
|
||||
@ -3572,8 +3517,7 @@ void DrawRandoEditor(bool& open) {
|
||||
ImGui::SetNextItemOpen(true, ImGuiCond_Once);
|
||||
if (ImGui::TreeNode(RandomizerCheckObjects::GetRCAreaName(areaIt.first).c_str())) {
|
||||
for (auto locationIt : areaIt.second) {
|
||||
if (locationIt.visibleInImgui &&
|
||||
!excludedLocations.count(locationIt.rc) &&
|
||||
if (locationIt.visibleInImgui && !excludedLocations.count(locationIt.rc) &&
|
||||
locationSearch.PassFilter(locationIt.rcSpoilerName.c_str())) {
|
||||
|
||||
if (ImGui::ArrowButton(std::to_string(locationIt.rc).c_str(), ImGuiDir_Right)) {
|
||||
@ -3661,8 +3605,7 @@ void DrawRandoEditor(bool& open) {
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::EndTable();
|
||||
}
|
||||
if (ImGui::BeginTable("tableRandoTricksGlitches", 2,
|
||||
ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
|
||||
if (ImGui::BeginTable("tableRandoTricksGlitches", 2, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
|
||||
ImGui::TableSetupColumn("Enable Tricks", ImGuiTableColumnFlags_WidthStretch, 200.0f);
|
||||
ImGui::TableSetupColumn("Enable Glitches", ImGuiTableColumnFlags_WidthStretch, 200.0f);
|
||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
||||
@ -3701,16 +3644,19 @@ void DrawRandoEditor(bool& open) {
|
||||
// COLUMN 1 - STARTING EQUIPMENT
|
||||
ImGui::TableNextColumn();
|
||||
window->DC.CurrLineTextBaseOffset = 0.0f;
|
||||
SohImGui::EnhancementCheckbox(Settings::StartingKokiriSword.GetName().c_str(), "gRandomizeStartingKokiriSword");
|
||||
SohImGui::EnhancementCheckbox(Settings::StartingKokiriSword.GetName().c_str(),
|
||||
"gRandomizeStartingKokiriSword");
|
||||
PaddedSeparator();
|
||||
SohImGui::EnhancementCheckbox(Settings::StartingDekuShield.GetName().c_str(), "gRandomizeStartingDekuShield");
|
||||
SohImGui::EnhancementCheckbox(Settings::StartingDekuShield.GetName().c_str(),
|
||||
"gRandomizeStartingDekuShield");
|
||||
|
||||
// COLUMN 2 - STARTING ITEMS
|
||||
ImGui::TableNextColumn();
|
||||
window->DC.CurrLineTextBaseOffset = 0.0f;
|
||||
SohImGui::EnhancementCheckbox(Settings::StartingOcarina.GetName().c_str(), "gRandomizeStartingOcarina");
|
||||
PaddedSeparator();
|
||||
SohImGui::EnhancementCheckbox(Settings::StartingConsumables.GetName().c_str(), "gRandomizeStartingConsumables");
|
||||
SohImGui::EnhancementCheckbox(Settings::StartingConsumables.GetName().c_str(),
|
||||
"gRandomizeStartingConsumables");
|
||||
PaddedSeparator();
|
||||
SohImGui::EnhancementCheckbox("Full Wallets", "gRandomizeFullWallets");
|
||||
InsertHelpHoverText("Start with a full wallet. All wallet upgrades come filled with rupees.");
|
||||
|
@ -1544,10 +1544,6 @@ extern "C" void* getN64WeirdFrame(s32 i) {
|
||||
return &weirdFrameBytes[i + sizeof(n64WeirdFrames)];
|
||||
}
|
||||
|
||||
extern "C" s32 Randomizer_GetItemIDFromGetItemID(s32 getItemId) {
|
||||
return OTRGlobals::Instance->gRandomizer->GetItemIDFromGetItemID(getItemId);
|
||||
}
|
||||
|
||||
extern "C" void Randomizer_LoadSettings(const char* spoilerFileName) {
|
||||
OTRGlobals::Instance->gRandomizer->LoadRandomizerSettings(spoilerFileName);
|
||||
}
|
||||
|
@ -98,7 +98,6 @@ u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey);
|
||||
RandomizerCheck Randomizer_GetCheckFromActor(s16 actorId, s16 actorParams, s16 sceneNum);
|
||||
void Randomizer_LoadHintLocations(const char* spoilerFileName);
|
||||
void Randomizer_LoadItemLocations(const char* spoilerFileName, bool silent);
|
||||
s32 Randomizer_GetItemIDFromGetItemID(s32 getItemId); // TODO: Remove me
|
||||
GetItemEntry Randomizer_GetRandomizedItem(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum);
|
||||
GetItemEntry Randomizer_GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
|
||||
bool Randomizer_ObtainedFreestandingIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId, Actor* actor);
|
||||
|
@ -509,12 +509,11 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((gSaveContext.n64ddFlag || getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) {
|
||||
getItem = Randomizer_GetRandomizedItem(getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
getItemId = getItem.getItemId;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
if (!Actor_HasParent(&this->actor, globalCtx)) {
|
||||
if (!gSaveContext.n64ddFlag && getItemId != GI_NONE) {
|
||||
func_8002F554(&this->actor, globalCtx, getItemId);
|
||||
} else {
|
||||
getItem = Randomizer_GetRandomizedItem(getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
GiveItemEntryFromActorWithFixedRange(&this->actor, globalCtx, getItem);
|
||||
}
|
||||
}
|
||||
@ -672,13 +671,13 @@ void func_8001E304(EnItem00* this, GlobalContext* globalCtx) {
|
||||
|
||||
void func_8001E5C8(EnItem00* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
GetItemEntry getItemEntry = Randomizer_GetRandomizedItem(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
|
||||
if (this->getItemId != GI_NONE) {
|
||||
if (!Actor_HasParent(&this->actor, globalCtx)) {
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 50.0f, 80.0f);
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 50.0f, 80.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry =
|
||||
Randomizer_GetRandomizedItem(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 50.0f, 80.0f);
|
||||
}
|
||||
this->unk_15A++;
|
||||
|
@ -858,7 +858,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
} else if (giid == GI_NUT_UPGRADE_30 || giid == GI_NUT_UPGRADE_40) {
|
||||
GiveLinkDekuNutUpgrade(giid);
|
||||
} else {
|
||||
s32 iid = Randomizer_GetItemIDFromGetItemID(giid);
|
||||
s32 iid = getItem.itemId;
|
||||
if (iid != -1) INV_CONTENT(iid) = iid;
|
||||
}
|
||||
} else if (getItem.modIndex == MOD_RANDOMIZER) {
|
||||
|
@ -546,7 +546,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId != GI_NONE) {
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
@ -587,7 +587,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId != GI_NONE) {
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
|
Loading…
x
Reference in New Issue
Block a user