From 1ac073db0790a6b403053e8cdf690fa00a194871 Mon Sep 17 00:00:00 2001 From: Tacoman369 <90735287+Tacoman369@users.noreply.github.com> Date: Tue, 28 May 2024 21:17:34 -0500 Subject: [PATCH] Various Fixes (#92) * Various Fixes - Renamed `PF Ext Log Chest` to `PF Ext Ledge Chest` as it was moved in 3D (thanks grezzo) - Adjusts Starting Song of Healing setting to prevent Deku Mask and Bomber's Notebook being unobtainable depending on settings. (When Starting with Song of Healing if Shuffle Transformation is OFF you will start with Deku Mask. If Shuffle Bombers Notebook is OFF you will start with Bombers Notebook. If Starting with Song of Healing and Shuffle Transformation or Shuffle Bombers Notebook are ON the respective item will be replaced with an unobtainable green rupee to prevent important items being placed there.) - Removes all button combinations involving ZL and ZR from the spoiler log menu opening button options - Fixes TI Tingle Romani Ranch Map Buy (Spring) not marking as obtained when buying TI Tingle Romani Ranch Map Buy or MR Tingle Romani Ranch Map Buy - Adds 2 missing Gossip Stones in Stone Tower - Adjust quest item placement to be independent of Anju and Kafei shuffle setting - Adds fighting requirement to entrances in Woodfall behind a hiploop - Fixes Moon Link Trial Chests not being randomized properly - Fixes Any Dungeon & Overworld settings for dungeon items will not work properly - Add setting to implement fast transformation mask animations. - Add setting for starting inventory Bomber's Notebook - Reorganize Starting Inventory so it's easier to navigate * Update Z3DR --- Z3DR | 2 +- source/dungeon.cpp | 2 + source/fill.cpp | 9 +- source/include/keys.hpp | 2 + source/include/setting_descriptions.hpp | 3 +- source/include/settings.hpp | 16 ++ source/item_location.cpp | 6 +- source/location_access.cpp | 6 +- source/setting_descriptions.cpp | 1 + source/settings.cpp | 233 ++++++++++++++++-------- source/spoiler_log.cpp | 45 ++++- source/starting_inventory.cpp | 2 +- 12 files changed, 233 insertions(+), 94 deletions(-) diff --git a/Z3DR b/Z3DR index fe5ba05..cfe9b2c 160000 --- a/Z3DR +++ b/Z3DR @@ -1 +1 @@ -Subproject commit fe5ba05dfd14d961b1f9304840e8f0403fa594b8 +Subproject commit cfe9b2c7b36424a7fd5567057fcff35bc1fa0a67 diff --git a/source/dungeon.cpp b/source/dungeon.cpp index 802a188..fb704cd 100644 --- a/source/dungeon.cpp +++ b/source/dungeon.cpp @@ -387,6 +387,8 @@ std::vector DungeonInfo::GetEveryLocation() const { THE_MOON_DEKU_TRIAL_BONUS, THE_MOON_GORON_TRIAL_BONUS, THE_MOON_ZORA_TRIAL_BONUS, + THE_MOON_GARO_CHEST, + THE_MOON_IRON_KNUCKLE_CHEST, THE_MOON_LINK_TRIAL_BONUS, THE_MOON_MAJORA_CHILD, },{} ); diff --git a/source/fill.cpp b/source/fill.cpp index a8c23b8..69a04d5 100644 --- a/source/fill.cpp +++ b/source/fill.cpp @@ -828,11 +828,13 @@ int Fill() { RandomizeDungeonRewards(); //Place dungeon items restricted to their Own Dungeon - for (auto dungeon : Dungeon::dungeonList) { RandomizeOwnDungeon(dungeon); } + //Then place dungeon items that are assigned to restrictive location pools + RandomizeDungeonItems(); + if (ShuffleGFRewards.Is((u8)GreatFairyRewardShuffleSetting::GFREWARDSHUFFLE_ALL_GREAT_FARIES)){ //get GF locations std::vector gfLocations = FilterFromPool(allLocations, [](const LocationKey loc) {return Location(loc)->IsCategory(Category::cFairyFountain);}); @@ -848,11 +850,9 @@ int Fill() { AssumedFill(mainadvancementItems, allLocations,true); //Then Place Anju & Kafei Items in spots accessable on Day 1, this should prevent situations where you cant get an item in time for its use - if(ShuffleTradeItems) { std::vector day1Locations = FilterFromPool(allLocations, [](const LocationKey loc) {return Location(loc)->IsCategory(Category::cDayOne);}); std::vector anjukafeiitems = FilterAndEraseFromPool(ItemPool, [](const ItemKey i) {return ItemTable(i).GetItemType() == ITEMTYPE_QUEST;}); AssumedFill(anjukafeiitems, day1Locations,true); - } //Then Place Deku Merchant Items /* if(ShuffleMerchants) { @@ -880,8 +880,7 @@ int Fill() { - //Then place dungeon items that are assigned to restrictive location pools - RandomizeDungeonItems(); + //Then place Link's Pocket Item if it has to be an advancement item //Links Pocket is useless as there is no unobtainable check due to a certain time travel sword pedistal diff --git a/source/include/keys.hpp b/source/include/keys.hpp index d99121b..2bddf2c 100644 --- a/source/include/keys.hpp +++ b/source/include/keys.hpp @@ -1031,6 +1031,8 @@ typedef enum { IC_DOCK_GOSSIP, IC_SAKON_GOSSIP, IC_SPIRIT_HOUSE_GOSSIP, + ST_LOWER_GOSSIP, + ST_UPPER_GOSSIP, MOON_DEKU_GOSSIP_1, MOON_DEKU_GOSSIP_2, MOON_DEKU_GOSSIP_3, diff --git a/source/include/setting_descriptions.hpp b/source/include/setting_descriptions.hpp index 668452b..7e1387f 100644 --- a/source/include/setting_descriptions.hpp +++ b/source/include/setting_descriptions.hpp @@ -229,4 +229,5 @@ extern string_view skipBombersMinigameDesc; extern string_view NARegionDesc; extern string_view EURegionDesc; extern string_view VersionDesc; -extern string_view LanguageDesc; \ No newline at end of file +extern string_view LanguageDesc; +extern string_view fastMaskDesc; \ No newline at end of file diff --git a/source/include/settings.hpp b/source/include/settings.hpp index 8964fcb..932deac 100644 --- a/source/include/settings.hpp +++ b/source/include/settings.hpp @@ -297,6 +297,7 @@ namespace Settings { extern Option StartingNutCapacity; extern Option StartingInventoryToggle; extern Option StartingOcarina; + extern Option StartingNotebook; extern Option StartingBombBag; extern Option StartingBombchus; extern Option StartingHookshot; @@ -349,6 +350,13 @@ namespace Settings { extern Option StartingRazorSword; extern Option StartingGildedSword; extern std::vector startingInventoryOptions; + extern std::vector startingInventoryInventory; + extern std::vector startingInventoryMasks; + extern std::vector startingInventorySongs; + extern std::vector startingInventoryUpgrades; + extern std::vector startingInventoryRemains; + extern std::vector startingInventoryTokensFairys; + extern std::vector startingInventoryMenu; //Starting Masks extern Option StartingMaskToggle; @@ -465,6 +473,7 @@ namespace Settings { extern Option DpadOcarina; extern Option DpadArrows; extern Option TwinmoldRestoraion; + extern Option FastMasks; //Trial Skips extern Option OdolwaTrialSkip; @@ -508,6 +517,13 @@ namespace Settings { extern Menu glitchSettings; //extern Menu itemSettings; extern Menu otherSettings; + extern Menu startingInventoryOptionals; + extern Menu startingInventoryInventoryMenu; + extern Menu startingInventoryMasksMenu; + extern Menu startingInventorySongsMenu; + extern Menu startingInventoryUpgradesMenu; + extern Menu startingInventoryRemainsMenu; + extern Menu startingInventoryTokensMenu; //Main Menu extern std::vector mainSettingsOptions; diff --git a/source/item_location.cpp b/source/item_location.cpp index b2b2111..84d9e02 100644 --- a/source/item_location.cpp +++ b/source/item_location.cpp @@ -314,7 +314,7 @@ void LocationTable_Init() { locationTable[PF_CAGE_ROOM_DEEP_CHEST] = ItemLocation::Chest (0x23, 0x06, true, "Pirate's Fortress Sewer Cage Room Deep Chest", PF_CAGE_ROOM_DEEP_CHEST, BLUE_RUPEE, {Category::cPiratesFortressSewer,Category::cChest ,Category::cDayOne}, SpoilerCollectionCheckGroup::GROUP_DUNGEON_PIRATE_FORTRESS ); locationTable[PF_MAZE_CHEST] = ItemLocation::Chest (0x23, 0x01, true, "Pirate's Fortress Sewer Maze Chest", PF_MAZE_CHEST, RED_RUPEE, {Category::cPiratesFortressSewer,Category::cChest ,Category::cDayOne}, SpoilerCollectionCheckGroup::GROUP_DUNGEON_PIRATE_FORTRESS ); locationTable[PF_SEWER_CAGE] = ItemLocation::Collectable(0x23, 0x00, false, "Pirate's Fortress Sewer Cage", PF_SEWER_CAGE, PIECE_OF_HEART, {Category::cPiratesFortressSewer, Category::cVanillaHeartPiece,Category::cDayOne}, SpoilerCollectionCheckGroup::GROUP_DUNGEON_PIRATE_FORTRESS ); - locationTable[PF_EXTERIOR_LOG_CHEST] = ItemLocation::Chest (0x3B, 0x00, true, "Pirate's Fortress Ext Log Chest", PF_EXTERIOR_LOG_CHEST, RED_RUPEE, {Category::cPiratesFortressExterior,Category::cChest ,Category::cDayOne}, SpoilerCollectionCheckGroup::GROUP_DUNGEON_PIRATE_FORTRESS ); + locationTable[PF_EXTERIOR_LOG_CHEST] = ItemLocation::Chest (0x3B, 0x00, true, "Pirate's Fortress Ext Ledge Chest", PF_EXTERIOR_LOG_CHEST, RED_RUPEE, {Category::cPiratesFortressExterior,Category::cChest ,Category::cDayOne}, SpoilerCollectionCheckGroup::GROUP_DUNGEON_PIRATE_FORTRESS ); locationTable[PF_EXTERIOR_SAND_CHEST] = ItemLocation::Chest (0x3B, 0x01, true, "Pirate's Fortress Ext Sand Chest", PF_EXTERIOR_SAND_CHEST, RED_RUPEE, {Category::cPiratesFortressExterior,Category::cChest ,Category::cDayOne}, SpoilerCollectionCheckGroup::GROUP_DUNGEON_PIRATE_FORTRESS ); locationTable[PF_EXTERIOR_CORNER_CHEST] = ItemLocation::Chest (0x3B, 0x02, true, "Pirate's Fortress Ext Corner Chest", PF_EXTERIOR_CORNER_CHEST, RED_RUPEE, {Category::cPiratesFortressExterior,Category::cChest ,Category::cDayOne}, SpoilerCollectionCheckGroup::GROUP_DUNGEON_PIRATE_FORTRESS ); locationTable[PF_INT_INVISIBLE_SOLDIER] = ItemLocation::Base (0x14, 0x8B, false, "Pirate's Fortress Int Invisible Soldier", PF_INT_INVISIBLE_SOLDIER, STONE_MASK, {Category::cPiratesFortressInterior, Category::cVanillaMask,Category::cDayOne}, SpoilerCollectionCheck::ItemGetInf(0), SpoilerCollectionCheckGroup::GROUP_DUNGEON_PIRATE_FORTRESS ); @@ -616,6 +616,8 @@ locationTable[CUCCO_SHACK_GOSSIP] = ItemLocatio locationTable[IC_DOCK_GOSSIP] = ItemLocation::HintStone (0x00,0x20b6, true, "IC Dock Gossip Stone", {}); locationTable[IC_SAKON_GOSSIP] = ItemLocation::HintStone (0x00,0x20c5, true, "IC Across from Sakon's Hideout Gossip Stone", {}); locationTable[IC_SPIRIT_HOUSE_GOSSIP] = ItemLocation::HintStone (0x00,0x20b7, true, "IC Above Spirit House Gossip Stone", {}); +locationTable[ST_LOWER_GOSSIP] = ItemLocation::HintStone (0x00,0x00, true, "Stone Tower Lower Gossip Stone", {}); +locationTable[ST_UPPER_GOSSIP] = ItemLocation::HintStone (0x00,0x00, true, "Stone Tower Upper Gossip Stone", {}); locationTable[MOON_DEKU_GOSSIP_1] = ItemLocation::HintStone (0x00,0x2109, true, "Moon Deku Trial Gossip Stone 1", {}); locationTable[MOON_DEKU_GOSSIP_2] = ItemLocation::HintStone (0x00,0x2108, true, "Moon Deku Trial Gossip Stone 2", {}); locationTable[MOON_DEKU_GOSSIP_3] = ItemLocation::HintStone (0x00,0x210b, true, "Moon Deku Trial Gossip Stone 3", {}); @@ -751,6 +753,8 @@ std::vector gossipStoneLocations = { IC_DOCK_GOSSIP, IC_SAKON_GOSSIP, IC_SPIRIT_HOUSE_GOSSIP, + ST_LOWER_GOSSIP, + ST_UPPER_GOSSIP, MOON_DEKU_GOSSIP_1, MOON_DEKU_GOSSIP_2, MOON_DEKU_GOSSIP_3, diff --git a/source/location_access.cpp b/source/location_access.cpp index 1fd1c71..42b463a 100644 --- a/source/location_access.cpp +++ b/source/location_access.cpp @@ -1050,9 +1050,9 @@ void AreaTable_Init() { }, { //Exits - Entrance(WOODFALL_TEMPLE_ENTRANCE, {[]{return DekuMask && CanPlay(SonataOfAwakening);}}), + Entrance(WOODFALL_TEMPLE_ENTRANCE, {[]{return DekuMask && CanPlay(SonataOfAwakening) && (Fighting || CanUseProjectile);}}), Entrance(SOUTHERN_SWAMP_TOP, {[]{return true;}}), - Entrance(WOODFALL_FAIRY_FOUNTAIN, {[]{return DekuMask;}}), + Entrance(WOODFALL_FAIRY_FOUNTAIN, {[]{return DekuMask && (Fighting || CanUseProjectile);}}), Entrance(WOODFALL_TEMPLE_PRINCESS_ROOM, {[]{return WoodfallClear;}}), }); @@ -2012,6 +2012,8 @@ void AreaTable_Init() { }, { //Locations + LocationAccess(ST_LOWER_GOSSIP, {[] {return CanPlay(ElegyOfEmptiness) && GoronMask && ZoraMask && Hookshot;}}), + LocationAccess(ST_UPPER_GOSSIP, {[] {return CanPlay(ElegyOfEmptiness) && GoronMask && ZoraMask && Hookshot;}}), }, { //Exits diff --git a/source/setting_descriptions.cpp b/source/setting_descriptions.cpp index a8d83cd..aa1cedd 100644 --- a/source/setting_descriptions.cpp +++ b/source/setting_descriptions.cpp @@ -623,6 +623,7 @@ string_view dpadArrowDesc = "Enables using D-Pad up to change your cu string_view twinmoldRestorationDesc = "Fixes Twinmold boss fight so Red Twinmold does not\n" "regen health when it burrows."; // // +string_view fastMaskDesc = "Enables Fast Transformation Animations."; // /*------------------------------- // | CUSTOM BUTTON MAPPING | // -------------------------------*/ // diff --git a/source/settings.cpp b/source/settings.cpp index dd71839..a04fd51 100644 --- a/source/settings.cpp +++ b/source/settings.cpp @@ -29,6 +29,7 @@ namespace Settings { std::vector bottleOptions = { "None", "Empty Bottle", "Red Potion", "Green Potion", "Blue Potion", "Fairy", "Deku Princess", "Milk", "Half Milk", "Fish", "Bugs", "Big Poe", "Spring Water", "Hot Spring Water", "Zora Egg", "Gold Dust", "Mushroom", "Seahorse", "Chateau Romani", "Mystery Milk", "Spoiled Mystery Milk" }; std::vector healthOptions = { "3 hearts", "4 hearts", "5 hearts", "6 hearts", "7 hearts", "8 hearts", "9 hearts", "10 hearts", "11 hearts", "12 hearts", "13 hearts", "14 hearts", "15 hearts", "16 hearts", "17 hearts", "18 hearts", "19 hearts", "20 hearts" };//, "1 heart", "2 hearts"}; // TODO: logic for lower health std::vector buttonOptions = { "Default", "Start", "Select", "Start + Select", "L + Start", "L + Select", "R + Start", "R + Select", "L + ZL", "L + ZR", "R + ZL", "R + ZR", "ZL + ZR", "ZL + Start", "ZL + Select", "ZR + Start", "ZR + Select"};//L+R not included as its too easy to accidentally do in normal gameplay, can be added later + std::vector spoilerOptions= { "Default", "Start", "Select", "Start + Select", "L + Start", "L + Select", "R + Start", "R + Select"};//ZL + ZR buttons do not work for the spoiler log //Function to avoid accidentally naming the options wrong, as logic.cpp requires these exact names std::vector GlitchDifficultyOptions(u8 enabledDifficulties) { @@ -54,7 +55,7 @@ namespace Settings { Option CustomItemsButton = Option::U8("Items", { buttonOptions }, { customItemsButtonDesc }, OptionCategory::Setting, 0); Option CustomMasksButton = Option::U8("Masks", { buttonOptions }, { customMasksButtonDesc }, OptionCategory::Setting, 0); Option CustomNotebookButton = Option::U8("Bombers Notebook", { buttonOptions }, { customNotebookDesc }, OptionCategory::Setting, 1); - Option IngameSpoilersButton = Option::U8("Ingame Spoiler Log",{ buttonOptions }, { ingameSpoilersButtonDesc }, OptionCategory::Setting, 2); + Option IngameSpoilersButton = Option::U8("Ingame Spoiler Log",{ spoilerOptions }, { ingameSpoilersButtonDesc }, OptionCategory::Setting, 2); std::vector