Shipwright/soh/soh/Enhancements/randomizer/3drando/fill.cpp

1175 lines
54 KiB
C++
Raw Normal View History

testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
#include "fill.hpp"
#include "custom_messages.hpp"
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
#include "../dungeon.h"
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
#include "../context.h"
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
#include "item_pool.hpp"
#include "location_access.hpp"
#include "random.hpp"
#include "spoiler_log.hpp"
#include "starting_inventory.hpp"
#include "hints.hpp"
#include "hint_list.hpp"
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
#include "../entrance.h"
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
#include "shops.hpp"
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
#include "pool_functions.hpp"
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
//#include "debug.hpp"
#include "soh/Enhancements/randomizer/static_data.h"
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
#include <vector>
#include <list>
#include <spdlog/spdlog.h>
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
using namespace CustomMessages;
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
using namespace Rando;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
static bool placementFailure = false;
static void RemoveStartingItemsFromPool() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerGet startingItem : StartingInventory) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
for (size_t i = 0; i < ItemPool.size(); i++) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
if (startingItem == RG_BIGGORON_SWORD) {
if (ItemPool[i] == RG_GIANTS_KNIFE || ItemPool[i] == RG_BIGGORON_SWORD) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
ItemPool[i] = GetJunkItem();
}
continue;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
} else if (startingItem == ItemPool[i] || (Rando::StaticData::RetrieveItem(startingItem).IsBottleItem() &&
Rando::StaticData::RetrieveItem(ItemPool[i]).IsBottleItem())) {
if (AdditionalHeartContainers > 0 &&
(startingItem == RG_PIECE_OF_HEART || startingItem == RG_TREASURE_GAME_HEART)) {
ItemPool[i] = RG_HEART_CONTAINER;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AdditionalHeartContainers--;
} else {
ItemPool[i] = GetJunkItem();
}
break;
}
}
}
}
//This function will propogate Time of Day access through the entrance
static bool UpdateToDAccess(Entrance* entrance, SearchMode mode) {
bool ageTimePropogated = false;
//propogate childDay, childNight, adultDay, and adultNight separately
Area* parent = entrance->GetParentRegion();
Area* connection = entrance->GetConnectedRegion();
if (!connection->childDay && parent->childDay && entrance->CheckConditionAtAgeTime(logic->IsChild, logic->AtDay)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
connection->childDay = true;
ageTimePropogated = true;
}
if (!connection->childNight && parent->childNight && entrance->CheckConditionAtAgeTime(logic->IsChild, logic->AtNight)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
connection->childNight = true;
ageTimePropogated = true;
}
if (!connection->adultDay && parent->adultDay && entrance->CheckConditionAtAgeTime(logic->IsAdult, logic->AtDay)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
connection->adultDay = true;
ageTimePropogated = true;
}
if (!connection->adultNight && parent->adultNight && entrance->CheckConditionAtAgeTime(logic->IsAdult, logic->AtNight)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
connection->adultNight = true;
ageTimePropogated = true;
}
//special check for temple of time
bool propogateTimeTravel = mode != SearchMode::TimePassAccess && mode != SearchMode::TempleOfTimeAccess;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
if (!AreaTable(RR_ROOT)->Adult() && AreaTable(RR_TOT_BEYOND_DOOR_OF_TIME)->Child() && propogateTimeTravel) {
AreaTable(RR_ROOT)->adultDay = AreaTable(RR_TOT_BEYOND_DOOR_OF_TIME)->childDay;
AreaTable(RR_ROOT)->adultNight = AreaTable(RR_TOT_BEYOND_DOOR_OF_TIME)->childNight;
} else if (!AreaTable(RR_ROOT)->Child() && AreaTable(RR_TOT_BEYOND_DOOR_OF_TIME)->Adult() && propogateTimeTravel){
AreaTable(RR_ROOT)->childDay = AreaTable(RR_TOT_BEYOND_DOOR_OF_TIME)->adultDay;
AreaTable(RR_ROOT)->childNight = AreaTable(RR_TOT_BEYOND_DOOR_OF_TIME)->adultNight;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
return ageTimePropogated;
}
// Various checks that need to pass for the world to be validated as completable
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
static void ValidateWorldChecks(SearchMode& mode, bool checkPoeCollectorAccess, bool checkOtherEntranceAccess, std::vector<RandomizerRegion>& areaPool) {
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
auto ctx = Rando::Context::GetInstance();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
// Condition for validating Temple of Time Access
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (mode == SearchMode::TempleOfTimeAccess && ((ctx->GetSettings()->ResolvedStartingAge() == RO_AGE_CHILD && AreaTable(RR_TEMPLE_OF_TIME)->Adult()) || (ctx->GetSettings()->ResolvedStartingAge() == RO_AGE_ADULT && AreaTable(RR_TEMPLE_OF_TIME)->Child()) || !checkOtherEntranceAccess)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
mode = SearchMode::ValidStartingRegion;
}
// Condition for validating a valid starting region
if (mode == SearchMode::ValidStartingRegion) {
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
bool childAccess = ctx->GetSettings()->ResolvedStartingAge() == RO_AGE_CHILD || AreaTable(RR_TOT_BEYOND_DOOR_OF_TIME)->Child();
bool adultAccess = ctx->GetSettings()->ResolvedStartingAge() == RO_AGE_ADULT || AreaTable(RR_TOT_BEYOND_DOOR_OF_TIME)->Adult();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
Area* kokiri = AreaTable(RR_KOKIRI_FOREST);
Area* kakariko = AreaTable(RR_KAKARIKO_VILLAGE);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
if ((childAccess && (kokiri->Child() || kakariko->Child())) ||
(adultAccess && (kokiri->Adult() || kakariko->Adult())) ||
!checkOtherEntranceAccess) {
mode = SearchMode::PoeCollectorAccess;
ApplyStartingInventory();
logic->NoBottles = true;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
// Condition for validating Poe Collector Access
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
if (mode == SearchMode::PoeCollectorAccess && (AreaTable(RR_MARKET_GUARD_HOUSE)->Adult() || !checkPoeCollectorAccess)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
// Apply all items that are necessary for checking all location access
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> itemsToPlace =
FilterFromPool(ItemPool, [](const auto i) { return Rando::StaticData::RetrieveItem(i).IsAdvancement(); });
for (RandomizerGet unplacedItem : itemsToPlace) {
Rando::StaticData::RetrieveItem(unplacedItem).ApplyEffect();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
// Reset access as the non-starting age
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetSettings()->ResolvedStartingAge() == RO_AGE_CHILD) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerRegion areaKey : areaPool) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AreaTable(areaKey)->adultDay = false;
AreaTable(areaKey)->adultNight = false;
}
} else {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerRegion areaKey : areaPool) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AreaTable(areaKey)->childDay = false;
AreaTable(areaKey)->childNight = false;
}
}
mode = SearchMode::AllLocationsReachable;
} else {
logic->NoBottles = false;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
//Get the max number of tokens that can possibly be useful
static int GetMaxGSCount() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//If bridge or LACS is set to tokens, get how many are required
int maxBridge = 0;
int maxLACS = 0;
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_RAINBOW_BRIDGE).Is(RO_BRIDGE_TOKENS)) {
maxBridge = ctx->GetOption(RSK_RAINBOW_BRIDGE_TOKEN_COUNT).Value<uint8_t>();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_GANONS_BOSS_KEY).Is(RO_GANON_BOSS_KEY_LACS_TOKENS)) {
maxLACS = ctx->GetOption(RSK_LACS_TOKEN_COUNT).Value<uint8_t>();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
maxBridge = std::max(maxBridge, maxLACS);
//Get the max amount of GS which could be useful from token reward locations
int maxUseful = 0;
//If the highest advancement item is a token, we know it is useless since it won't lead to an otherwise useful item
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
if (ctx->GetItemLocation(RC_KAK_100_GOLD_SKULLTULA_REWARD)->GetPlacedItem().IsAdvancement() && ctx->GetItemLocation(RC_KAK_100_GOLD_SKULLTULA_REWARD)->GetPlacedItem().GetItemType() != ITEMTYPE_TOKEN) {
maxUseful = 100;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
} else if (ctx->GetItemLocation(RC_KAK_50_GOLD_SKULLTULA_REWARD)->GetPlacedItem().IsAdvancement() &&
ctx->GetItemLocation(RC_KAK_50_GOLD_SKULLTULA_REWARD)->GetPlacedItem().GetItemType() != ITEMTYPE_TOKEN) {
maxUseful = 50;
} else if (ctx->GetItemLocation(RC_KAK_40_GOLD_SKULLTULA_REWARD)->GetPlacedItem().IsAdvancement() &&
ctx->GetItemLocation(RC_KAK_40_GOLD_SKULLTULA_REWARD)->GetPlacedItem().GetItemType() != ITEMTYPE_TOKEN) {
maxUseful = 40;
} else if (ctx->GetItemLocation(RC_KAK_30_GOLD_SKULLTULA_REWARD)->GetPlacedItem().IsAdvancement() &&
ctx->GetItemLocation(RC_KAK_30_GOLD_SKULLTULA_REWARD)->GetPlacedItem().GetItemType() != ITEMTYPE_TOKEN) {
maxUseful = 30;
} else if (ctx->GetItemLocation(RC_KAK_20_GOLD_SKULLTULA_REWARD)->GetPlacedItem().IsAdvancement() &&
ctx->GetItemLocation(RC_KAK_20_GOLD_SKULLTULA_REWARD)->GetPlacedItem().GetItemType() != ITEMTYPE_TOKEN) {
maxUseful = 20;
} else if (ctx->GetItemLocation(RC_KAK_10_GOLD_SKULLTULA_REWARD)->GetPlacedItem().IsAdvancement() &&
ctx->GetItemLocation(RC_KAK_10_GOLD_SKULLTULA_REWARD)->GetPlacedItem().GetItemType() != ITEMTYPE_TOKEN) {
maxUseful = 10;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
//Return max of the two possible reasons tokens could be important, minus the tokens in the starting inventory
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
return std::max(maxUseful, maxBridge) - ctx->GetOption(RSK_STARTING_SKULLTULA_TOKEN).Value<uint8_t>();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
std::string GetShopItemBaseName(std::string itemName) {
std::string baseName = itemName.erase(0, 4); //Delete "Buy "
//Delete amount, if present (so when it looks like Buy Deku Nut (10) remove the (10))
if (baseName.find("(") != std::string::npos) {
baseName = baseName.erase(baseName.find("("));
}
//Do the same for [] (only applies to red potions, other things with [] also have a ())
if (baseName.find("[") != std::string::npos) {
baseName = baseName.erase(baseName.find("["));
}
return baseName;
}
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> GetEmptyLocations(std::vector<RandomizerCheck> allowedLocations) {
auto ctx = Rando::Context::GetInstance();
return FilterFromPool(allowedLocations, [ctx](const auto loc) {
return ctx->GetItemLocation(loc)->GetPlacedRandomizerGet() == RG_NONE;
});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> GetAllEmptyLocations() {
auto ctx = Rando::Context::GetInstance();
return FilterFromPool(ctx->allLocations, [ctx](const auto loc) {
return ctx->GetItemLocation(loc)->GetPlacedRandomizerGet() == RG_NONE;
});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
bool IsBombchus(RandomizerGet item, bool includeShops = false){
return (item >= RG_BOMBCHU_5 && item <= RG_BOMBCHU_DROP) || item == RG_PROGRESSIVE_BOMBCHUS ||
(includeShops && (item == RG_BUY_BOMBCHU_10 || item == RG_BUY_BOMBCHU_20));
}
bool IsBeatableWithout(RandomizerCheck excludedCheck, bool replaceItem, RandomizerGet ignore = RG_NONE){ //RANDOTODO make excludCheck an ItemLocation
auto ctx = Rando::Context::GetInstance();
RandomizerGet copy = ctx->GetItemLocation(excludedCheck)->GetPlacedRandomizerGet(); //Copy out item
ctx->GetItemLocation(excludedCheck)->SetPlacedItem(RG_NONE); //Write in empty item
ctx->playthroughBeatable = false;
logic->Reset();
GetAccessibleLocations(ctx->allLocations, SearchMode::CheckBeatable, ignore); //Check if game is still beatable
if (replaceItem){
ctx->GetItemLocation(excludedCheck)->SetPlacedItem(copy); //Immediately put item back
}
return ctx->playthroughBeatable;
}
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//This function will return a vector of ItemLocations that are accessible with
//where items have been placed so far within the world. The allowedLocations argument
//specifies the pool of locations that we're trying to search for an accessible location in
std::vector<RandomizerCheck> GetAccessibleLocations(const std::vector<RandomizerCheck>& allowedLocations, SearchMode mode /* = SearchMode::ReachabilitySearch*/, RandomizerGet ignore /* = RG_NONE*/, bool checkPoeCollectorAccess /*= false*/, bool checkOtherEntranceAccess /*= false*/) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
std::vector<RandomizerCheck> accessibleLocations;
// Reset all access to begin a new search
if (mode < SearchMode::ValidateWorld) {
ApplyStartingInventory();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
Areas::AccessReset();
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->LocationReset();
std::vector<RandomizerRegion> areaPool = {RR_ROOT};
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
if (mode == SearchMode::ValidateWorld) {
mode = SearchMode::TimePassAccess;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
AreaTable(RR_ROOT)->childNight = true;
AreaTable(RR_ROOT)->adultNight = true;
AreaTable(RR_ROOT)->childDay = true;
AreaTable(RR_ROOT)->adultDay = true;
ctx->allLocationsReachable = false;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
//Variables for playthrough
int gsCount = 0;
const int maxGsCount = mode == SearchMode::GeneratePlaythrough ? GetMaxGSCount() : 0; //If generating playthrough want the max that's possibly useful, else doesn't matter
bool bombchusFound = false;
std::vector<std::variant<bool*, uint8_t*>> buyIgnores;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Variables for search
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<Rando::ItemLocation*> newItemLocations;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
bool updatedEvents = false;
bool ageTimePropogated = false;
bool firstIteration = true;
//Variables for Time Pass access
bool timePassChildDay = false;
bool timePassChildNight = false;
bool timePassAdultDay = false;
bool timePassAdultNight = false;
// Main access checking loop
while (newItemLocations.size() > 0 || updatedEvents || ageTimePropogated || firstIteration) {
firstIteration = false;
ageTimePropogated = false;
updatedEvents = false;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (Rando::ItemLocation* location : newItemLocations) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
location->ApplyPlacedItemEffect();
}
newItemLocations.clear();
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> itemSphere;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
std::list<Entrance*> entranceSphere;
for (size_t i = 0; i < areaPool.size(); i++) {
Area* area = AreaTable(areaPool[i]);
if (area->UpdateEvents(mode)){
updatedEvents = true;
}
// If we're checking for TimePass access do that for each area as it's being updated.
// TimePass Access is satisfied when every AgeTime can reach an area with TimePass
// without the aid of TimePass. During this mode, TimePass won't update ToD access
// in any area.
if (mode == SearchMode::TimePassAccess) {
if (area->timePass) {
if (area->childDay) {
timePassChildDay = true;
}
if (area->childNight) {
timePassChildNight = true;
}
if (area->adultDay) {
timePassAdultDay = true;
}
if (area->adultNight) {
timePassAdultNight = true;
}
}
// Condition for validating that all startring AgeTimes have timepass access
// Once satisifed, change the mode to begin checking for Temple of Time Access
if ((timePassChildDay && timePassChildNight && timePassAdultDay && timePassAdultNight) || !checkOtherEntranceAccess) {
mode = SearchMode::TempleOfTimeAccess;
}
}
//for each exit in this area
for (auto& exit : area->exits) {
//Update Time of Day Access for the exit
if (UpdateToDAccess(&exit, mode)) {
ageTimePropogated = true;
ValidateWorldChecks(mode, checkPoeCollectorAccess, checkOtherEntranceAccess, areaPool);
}
//If the exit is accessible and hasn't been added yet, add it to the pool
Area* exitArea = exit.GetConnectedRegion();
if (!exitArea->addedToPool && exit.ConditionsMet()) {
exitArea->addedToPool = true;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
areaPool.push_back(exit.GetConnectedRegionKey());
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
// Add shuffled entrances to the entrance playthrough
// Include bluewarps when unshuffled but dungeon or boss shuffle is on
if (mode == SearchMode::GeneratePlaythrough &&
(exit.IsShuffled() ||
(exit.GetType() == Rando::EntranceType::BlueWarp &&
(ctx->GetOption(RSK_SHUFFLE_DUNGEON_ENTRANCES) || ctx->GetOption(RSK_SHUFFLE_BOSS_ENTRANCES)))) &&
!exit.IsAddedToPool() && !ctx->GetEntranceShuffler()->HasNoRandomEntrances()) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
entranceSphere.push_back(&exit);
exit.AddToPool();
// Don't list a two-way coupled entrance from both directions
if (exit.GetReverse() != nullptr && exit.GetReplacement()->GetReverse() != nullptr && !exit.IsDecoupled()) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
exit.GetReplacement()->GetReverse()->AddToPool();
}
}
}
//for each ItemLocation in this area
if (mode < SearchMode::ValidateWorld) {
for (size_t k = 0; k < area->locations.size(); k++) {
LocationAccess& locPair = area->locations[k];
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
RandomizerCheck loc = locPair.GetLocation();
Rando::ItemLocation* location = ctx->GetItemLocation(loc);
RandomizerGet locItem = location->GetPlacedRandomizerGet();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
if (!location->IsAddedToPool() && locPair.ConditionsMet()) {
location->AddToPool();
if (locItem == RG_NONE) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
accessibleLocations.push_back(loc); //Empty location, consider for placement
} else {
//If ignore has a value, we want to check if the item location should be considered or not
//This is necessary due to the below preprocessing for playthrough generation
if (ignore != RG_NONE) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
ItemType type = location->GetPlacedItem().GetItemType();
//If we want to ignore tokens, only add if not a token
if (ignore == RG_GOLD_SKULLTULA_TOKEN && type != ITEMTYPE_TOKEN) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
newItemLocations.push_back(location);
}
//If we want to ignore bombchus, only add if bombchu is not in the name
else if (IsBombchus(ignore) && IsBombchus(locItem, true)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
newItemLocations.push_back(location);
}
//We want to ignore a specific Buy item. Buy items with different RandomizerGets are recognised by a shared GetLogicVar
else if (ignore != RG_GOLD_SKULLTULA_TOKEN && IsBombchus(ignore)) {
if ((type == ITEMTYPE_SHOP && Rando::StaticData::GetItemTable()[ignore].GetLogicVar() != location->GetPlacedItem().GetLogicVar()) || type != ITEMTYPE_SHOP) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
newItemLocations.push_back(location);
}
}
}
//If it doesn't, we can just add the location
else {
newItemLocations.push_back(location); //Add item to cache to be considered in logic next iteration
}
}
//Playthrough stuff
//Generate the playthrough, so we want to add advancement items, unless we know to ignore them
if (mode == SearchMode::GeneratePlaythrough) {
//Item is an advancement item, figure out if it should be added to this sphere
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
if (!ctx->playthroughBeatable && location->GetPlacedItem().IsAdvancement()) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
ItemType type = location->GetPlacedItem().GetItemType();
bool bombchus = IsBombchus(locItem, true); //Is a bombchu location
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Decide whether to exclude this location
//This preprocessing is done to reduce the amount of searches performed in PareDownPlaythrough
//Want to exclude:
//1) Tokens after the last potentially useful one (the last one that gives an advancement item or last for token bridge)
//2) Bombchus after the first (including buy bombchus)
//3) Buy items of the same type, after the first (So only see Buy Deku Nut of any amount once)
bool exclude = true;
//Exclude tokens after the last possibly useful one
if (type == ITEMTYPE_TOKEN && gsCount < maxGsCount) {
gsCount++;
exclude = false;
}
//Only print first bombchu location found
else if (bombchus && !bombchusFound) {
bombchusFound = true;
exclude = false;
}
//Handle buy items
//If ammo drops are off, don't do this step, since buyable ammo becomes logically important
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
// TODO: Reimplement Ammo Drops setting
else if (/*AmmoDrops.IsNot(AMMODROPS_NONE) &&*/ !(bombchus && bombchusFound) && type == ITEMTYPE_SHOP) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Only check each buy item once
auto buyItem = location->GetPlacedItem().GetLogicVar();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Buy item not in list to ignore, add it to list and write to playthrough
if (std::find(buyIgnores.begin(), buyIgnores.end(), buyItem) == buyIgnores.end()) {
exclude = false;
buyIgnores.push_back(buyItem);
}
}
//Add all other advancement items
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
else if (!bombchus && type != ITEMTYPE_TOKEN && (/*AmmoDrops.Is(AMMODROPS_NONE) ||*/ type != ITEMTYPE_SHOP)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
exclude = false;
}
//Has not been excluded, add to playthrough
if (!exclude) {
itemSphere.push_back(loc);
}
}
//Triforce has been found, seed is beatable, nothing else in this or future spheres matters
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
else if (location->GetPlacedRandomizerGet() == RG_TRIFORCE) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
itemSphere.clear();
itemSphere.push_back(loc);
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->playthroughBeatable = true;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
//All we care about is if the game is beatable, used to pare down playthrough
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
else if (location->GetPlacedRandomizerGet() == RG_TRIFORCE && mode == SearchMode::CheckBeatable) {
ctx->playthroughBeatable = true;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
return {}; //Return early for efficiency
}
}
}
}
}
if (mode == SearchMode::GeneratePlaythrough && itemSphere.size() > 0) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->playthroughLocations.push_back(itemSphere);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (mode == SearchMode::GeneratePlaythrough && entranceSphere.size() > 0 && !ctx->GetEntranceShuffler()->HasNoRandomEntrances()) {
ctx->GetEntranceShuffler()->playthroughEntrances.push_back(entranceSphere);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
//Check to see if all locations were reached
if (mode == SearchMode::AllLocationsReachable) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->allLocationsReachable = true;
for (const RandomizerCheck loc : ctx->allLocations) {
if (!ctx->GetItemLocation(loc)->IsAddedToPool()) {
ctx->allLocationsReachable = false;
auto message = "Location " +
Rando::StaticData::GetLocation(ctx->GetItemLocation(loc)->GetRandomizerCheck())->GetName() +
" not reachable\n";
SPDLOG_DEBUG(message);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
#ifndef ENABLE_DEBUG
break;
#endif
}
}
return {};
}
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
erase_if(accessibleLocations, [&allowedLocations, ctx](RandomizerCheck loc){
for (RandomizerCheck allowedLocation : allowedLocations) {
if (loc == allowedLocation || ctx->GetItemLocation(loc)->GetPlacedRandomizerGet() != RG_NONE) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
return false;
}
}
return true;
});
return accessibleLocations;
}
static void GeneratePlaythrough() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
ctx->playthroughBeatable = false;
logic->Reset();
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
GetAccessibleLocations(ctx->allLocations, SearchMode::GeneratePlaythrough);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
RandomizerArea LookForExternalArea(Area* curRegion, std::vector<RandomizerRegion> alreadyChecked){//RANDOTODO curREGION
for (auto& entrance : curRegion->entrances) {
RandomizerArea otherArea = entrance->GetParentRegion()->GetArea();
if(otherArea != RA_NONE){
return otherArea;
//if the area hasn't already been checked, check it
} else if (std::find(alreadyChecked.begin(), alreadyChecked.end(), entrance->GetParentRegionKey()) == alreadyChecked.end()) {
alreadyChecked.push_back(entrance->GetParentRegionKey());
RandomizerArea passdown = LookForExternalArea(entrance->GetParentRegion(), alreadyChecked);
if(passdown != RA_NONE){
return passdown;
}
}
}
return RA_NONE;
}
void SetAreas(){
auto ctx = Rando::Context::GetInstance();
//RANDOTODO give entrances an enum like RandomizerCheck, the give them all areas here, the use those areas to not need to recursivly find ItemLocation areas
for (int c = 0; c < RR_MARKER_AREAS_END; c++) {
Area region = areaTable[c];
RandomizerArea area = region.GetArea();
if (area == RA_NONE) {
std::vector<RandomizerRegion> alreadyChecked = {(RandomizerRegion)c};
area = LookForExternalArea(&region, alreadyChecked);
}
for (auto& loc : region.locations){
ctx->GetItemLocation(loc.GetLocation())->SetArea(area);
}
}
}
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Remove unnecessary items from playthrough by removing their location, and checking if game is still beatable
//To reduce searches, some preprocessing is done in playthrough generation to avoid adding obviously unnecessary items
static void PareDownPlaythrough() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
std::vector<RandomizerCheck> toAddBackItem;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Start at sphere before Ganon's and count down
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (int i = ctx->playthroughLocations.size() - 2; i >= 0; i--) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Check each item location in sphere
std::vector<int> erasableIndices;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> sphere = ctx->playthroughLocations.at(i);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
for (int j = sphere.size() - 1; j >= 0; j--) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
RandomizerCheck loc = sphere.at(j);
RandomizerGet locGet = ctx->GetItemLocation(loc)->GetPlacedRandomizerGet(); //Copy out item
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
RandomizerGet ignore = RG_NONE;
if (locGet == RG_GOLD_SKULLTULA_TOKEN || IsBombchus(locGet, true)
|| Rando::StaticData::RetrieveItem(locGet).GetItemType() == ITEMTYPE_SHOP) {
ignore = locGet;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
//Playthrough is still beatable without this item, therefore it can be removed from playthrough section.
if (IsBeatableWithout(loc, false, ignore)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->playthroughLocations[i].erase(ctx->playthroughLocations[i].begin() + j);
ctx->GetItemLocation(loc)->SetDelayedItem(locGet); //Game is still beatable, don't add back until later
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
toAddBackItem.push_back(loc);
}
else {
ctx->GetItemLocation(loc)->SetPlacedItem(locGet); //Immediately put item back so game is beatable again
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
}
//Some spheres may now be empty, remove these
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (int i = ctx->playthroughLocations.size() - 2; i >= 0; i--) {
if (ctx->playthroughLocations.at(i).size() == 0) {
ctx->playthroughLocations.erase(ctx->playthroughLocations.begin() + i);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
//Now we can add back items which were removed previously
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerCheck loc : toAddBackItem) {
ctx->GetItemLocation(loc)->SaveDelayedItem();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
//Very similar to PareDownPlaythrough except it sets WotH candidacy of Way of the Hero items
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Way of the Hero items are more specific than playthrough items in that they are items which *must*
// be obtained to logically be able to complete the seed, rather than playthrough items which
// are just possible items you *can* collect to complete the seed.
static void CalculateWotH() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//size - 1 so Triforce is not counted
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (size_t i = 0; i < ctx->playthroughLocations.size() - 1; i++) {
for (size_t j = 0; j < ctx->playthroughLocations[i].size(); j++) {
//If removing this item and no other item caused the game to become unbeatable, then it is strictly necessary, so add it
if (ctx->GetItemLocation(ctx->playthroughLocations[i][j])->IsHintable()
&& !(IsBeatableWithout(ctx->playthroughLocations[i][j], true))) {
ctx->GetItemLocation(ctx->playthroughLocations[i][j])->SetWothCandidate();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
}
ctx->playthroughBeatable = true;
logic->Reset();
GetAccessibleLocations(ctx->allLocations);
}
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Calculate barren locations and assign Barren Candidacy to all locations inside those areas
static void CalculateBarren() {
auto ctx = Rando::Context::GetInstance();
std::array<bool, RA_MAX> NotBarren = {}; //I would invert this but the "initialise all as true" syntax wasn't working
for (RandomizerCheck loc : ctx->allLocations) {
Rando::ItemLocation* itemLoc = ctx->GetItemLocation(loc);
RandomizerArea locArea = itemLoc->GetArea();
bool test = (itemLoc->GetPlacedItem().IsMajorItem() || itemLoc->IsWothCandidate());
// If a location has a major item or is a way of the hero location, it is not barren
if (NotBarren[locArea] == false && locArea > RA_LINKS_POCKET && (itemLoc->GetPlacedItem().IsMajorItem() || itemLoc->IsWothCandidate())) {
NotBarren[locArea] = true;
}
}
for (RandomizerCheck loc : ctx->allLocations) {
Rando::ItemLocation* itemLoc = ctx->GetItemLocation(loc);
if (!NotBarren[itemLoc->GetArea()]){
itemLoc->SetBarrenCandidate();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
}
//Will place things completely randomly, no logic checks are performed
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
static void FastFill(std::vector<RandomizerGet> items, std::vector<RandomizerCheck> locations, bool endOnItemsEmpty = false) {
auto ctx = Rando::Context::GetInstance();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Loop until locations are empty, or also end if items are empty and the parameters specify to end then
while (!locations.empty() && (!endOnItemsEmpty || !items.empty())) {
if (items.empty() && !endOnItemsEmpty) {
items.push_back(GetJunkItem());
}
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
RandomizerCheck loc = RandomElement(locations, true);
ctx->GetItemLocation(loc)->SetAsHintable();
ctx->PlaceItemInLocation(loc, RandomElement(items, true));
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
/*
| The algorithm places items in the world in reverse.
| This means we first assume we have every item in the item pool and
| remove an item and try to place it somewhere that is still reachable
| This method helps distribution of items locked behind many requirements.
| - OoT Randomizer
*/
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
static void AssumedFill(const std::vector<RandomizerGet>& items, const std::vector<RandomizerCheck>& allowedLocations,
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
bool setLocationsAsHintable = false) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
if (items.size() > allowedLocations.size()) {
printf("\x1b[2;2HERROR: MORE ITEMS THAN LOCATIONS IN GIVEN LISTS");
SPDLOG_DEBUG("Items:\n");
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
// NOLINTNEXTLINE(clang-diagnostic-unused-variable)
for (const RandomizerGet item : items) {
SPDLOG_DEBUG("\t");
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
SPDLOG_DEBUG(Rando::StaticData::RetrieveItem(item).GetName().GetEnglish());
SPDLOG_DEBUG("\n");
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
SPDLOG_DEBUG("\nAllowed Locations:\n");
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
// NOLINTNEXTLINE(clang-diagnostic-unused-variable)
for (const RandomizerCheck loc : allowedLocations) {
SPDLOG_DEBUG("\t");
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
SPDLOG_DEBUG(Rando::StaticData::GetLocation(loc)->GetName());
SPDLOG_DEBUG("\n");
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
placementFailure = true;
return;
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_NO_LOGIC)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
FastFill(items, GetEmptyLocations(allowedLocations), true);
return;
}
// keep retrying to place everything until it works or takes too long
int retries = 10;
bool unsuccessfulPlacement = false;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> attemptedLocations;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
do {
retries--;
if (retries <= 0) {
placementFailure = true;
return;
}
unsuccessfulPlacement = false;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> itemsToPlace = items;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
// copy all not yet placed advancement items so that we can apply their effects for the fill algorithm
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> itemsToNotPlace =
FilterFromPool(ItemPool, [](const auto i) { return Rando::StaticData::RetrieveItem(i).IsAdvancement(); });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
// shuffle the order of items to place
Shuffle(itemsToPlace);
while (!itemsToPlace.empty()) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
RandomizerGet item = std::move(itemsToPlace.back());
Rando::StaticData::RetrieveItem(item).SetAsPlaythrough();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
itemsToPlace.pop_back();
// assume we have all unplaced items
logic->Reset();
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerGet unplacedItem : itemsToPlace) {
Rando::StaticData::RetrieveItem(unplacedItem).ApplyEffect();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerGet unplacedItem : itemsToNotPlace) {
Rando::StaticData::RetrieveItem(unplacedItem).ApplyEffect();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
// get all accessible locations that are allowed
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
const std::vector<RandomizerCheck> accessibleLocations = GetAccessibleLocations(allowedLocations);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
// retry if there are no more locations to place items
if (accessibleLocations.empty()) {
SPDLOG_DEBUG("\nCANNOT PLACE ");
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
SPDLOG_DEBUG(Rando::StaticData::RetrieveItem(item).GetName().GetEnglish());
SPDLOG_DEBUG(". TRYING AGAIN...\n");
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
#ifdef ENABLE_DEBUG
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
Areas::DumpWorldGraph(Rando::StaticData::RetrieveItem(item).GetName().GetEnglish());
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
PlacementLog_Write();
#endif
// reset any locations that got an item
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerCheck loc : attemptedLocations) {
ctx->GetItemLocation(loc)->SetPlacedItem(RG_NONE);
//itemsPlaced--;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
attemptedLocations.clear();
unsuccessfulPlacement = true;
break;
}
// place the item within one of the allowed locations
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
RandomizerCheck selectedLocation = RandomElement(accessibleLocations);
ctx->PlaceItemInLocation(selectedLocation, item);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
attemptedLocations.push_back(selectedLocation);
// This tells us the location went through the randomization algorithm
// to distinguish it from locations which did not or that the player already
// knows
if (setLocationsAsHintable) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->GetItemLocation(selectedLocation)->SetAsHintable();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
// If ALR is off, then we check beatability after placing the item.
// If the game is beatable, then we can stop placing items with logic.
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (!ctx->GetOption(RSK_ALL_LOCATIONS_REACHABLE)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->playthroughBeatable = false;
logic->Reset();
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
GetAccessibleLocations(ctx->allLocations, SearchMode::CheckBeatable);
if (ctx->playthroughBeatable) {
SPDLOG_DEBUG("Game beatable, now placing items randomly. " + std::to_string(itemsToPlace.size()) +
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
" major items remaining.\n\n");
FastFill(itemsToPlace, GetEmptyLocations(allowedLocations), true);
return;
}
}
}
} while (unsuccessfulPlacement);
}
//This function will specifically randomize dungeon rewards for the End of Dungeons
//setting, or randomize one dungeon reward to Link's Pocket if that setting is on
static void RandomizeDungeonRewards() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
std::array<uint32_t, 9> rDungeonRewardOverrides{};
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//quest item bit mask of each stone/medallion for the savefile
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
// static constexpr std::array<uint32_t, 9> bitMaskTable = {
// 0x00040000, //Kokiri Emerald
// 0x00080000, //Goron Ruby
// 0x00100000, //Zora Sapphire
// 0x00000001, //Forest Medallion
// 0x00000002, //Fire Medallion
// 0x00000004, //Water Medallion
// 0x00000008, //Spirit Medallion
// 0x00000010, //Shadow Medallion
// 0x00000020, //Light Medallion
// };
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
int baseOffset = Rando::StaticData::RetrieveItem(RG_KOKIRI_EMERALD).GetItemID();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//End of Dungeons includes Link's Pocket
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHUFFLE_DUNGEON_REWARDS).Is(RO_DUNGEON_REWARDS_END_OF_DUNGEON)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//get stones and medallions
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> rewards = FilterAndEraseFromPool(ItemPool, [](const auto i) {return Rando::StaticData::RetrieveItem(i).GetItemType() == ITEMTYPE_DUNGEONREWARD;});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
// If there are less than 9 dungeon rewards, prioritize the actual dungeons
// for placement instead of Link's Pocket
if (rewards.size() < 9) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->PlaceItemInLocation(RC_LINKS_POCKET, RG_GREEN_RUPEE);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_VANILLA)) { //Place dungeon rewards in vanilla locations
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerCheck loc : Rando::StaticData::dungeonRewardLocations) {
ctx->GetItemLocation(loc)->PlaceVanillaItem();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
} else { //Randomize dungeon rewards with assumed fill
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
AssumedFill(rewards, Rando::StaticData::dungeonRewardLocations);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (size_t i = 0; i < Rando::StaticData::dungeonRewardLocations.size(); i++) {
const auto index = ctx->GetItemLocation(Rando::StaticData::dungeonRewardLocations[i])->GetPlacedItem().GetItemID() - baseOffset;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
rDungeonRewardOverrides[i] = index;
//set the player's dungeon reward on file creation instead of pushing it to them at the start.
//This is done mainly because players are already familiar with seeing their dungeon reward
//before opening up their file
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
// if (i == Rando::StaticData::dungeonRewardLocations.size()-1) {
// LinksPocketRewardBitMask = bitMaskTable[index];
// }
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_LINKS_POCKET).Is(RO_LINKS_POCKET_DUNGEON_REWARD)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//get 1 stone/medallion
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> rewards = FilterFromPool(
ItemPool, [](const auto i) { return Rando::StaticData::RetrieveItem(i).GetItemType() == ITEMTYPE_DUNGEONREWARD; });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
// If there are no remaining stones/medallions, then Link's pocket won't get one
if (rewards.empty()) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->PlaceItemInLocation(RC_LINKS_POCKET, RG_GREEN_RUPEE);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
return;
}
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
RandomizerGet startingReward = RandomElement(rewards, true);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
//LinksPocketRewardBitMask = bitMaskTable[Rando::StaticData::RetrieveItem(startingReward).GetItemID() - baseOffset];
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->PlaceItemInLocation(RC_LINKS_POCKET, startingReward);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//erase the stone/medallion from the Item Pool
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
FilterAndEraseFromPool(ItemPool, [startingReward](const RandomizerGet i) {return i == startingReward;});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
//Fills any locations excluded by the player with junk items so that advancement items
//can't be placed there.
static void FillExcludedLocations() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Only fill in excluded locations that don't already have something and are forbidden
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> excludedLocations = FilterFromPool(ctx->allLocations, [ctx](const auto loc){
return ctx->GetItemLocation(loc)->IsExcluded();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
});
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerCheck loc : excludedLocations) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
PlaceJunkInExcludedLocation(loc);
}
}
//Function to handle the Own Dungeon setting
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
static void RandomizeOwnDungeon(const Rando::DungeonInfo* dungeon) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
std::vector<RandomizerGet> dungeonItems;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
// Search and filter for locations that match the hint region of the dungeon
// This accounts for boss room shuffle so that own dungeon items can be placed
// in the shuffled boss room
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> dungeonLocations = FilterFromPool(ctx->allLocations, [dungeon, ctx](const auto loc) {
return ctx->GetItemLocation(loc)->GetArea() == dungeon->GetArea();
});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//filter out locations that may be required to have songs placed at them
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
dungeonLocations = FilterFromPool(dungeonLocations, [ctx](const auto loc){
if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_SONG_LOCATIONS)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
return !(Rando::StaticData::GetLocation(loc)->IsCategory(Category::cSong));
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_SONG_LOCATIONS)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
return !(Rando::StaticData::GetLocation(loc)->IsCategory(Category::cSongDungeonReward));
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
return true;
});
//Add specific items that need be randomized within this dungeon
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) && dungeon->GetSmallKey() != RG_NONE) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> dungeonSmallKeys = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){ return (i == dungeon->GetSmallKey()) || (i == dungeon->GetKeyRing());});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(dungeonItems, dungeonSmallKeys);
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if ((ctx->GetOption(RSK_BOSS_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) && dungeon->GetBossKey() != RG_GANONS_CASTLE_BOSS_KEY) ||
(ctx->GetOption(RSK_GANONS_BOSS_KEY).Is(RO_GANON_BOSS_KEY_OWN_DUNGEON) && dungeon->GetBossKey() == RG_GANONS_CASTLE_BOSS_KEY)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto dungeonBossKey = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){ return i == dungeon->GetBossKey();});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(dungeonItems, dungeonBossKey);
}
//randomize boss key and small keys together for even distribution
AssumedFill(dungeonItems, dungeonLocations);
//randomize map and compass separately since they're not progressive
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHUFFLE_MAPANDCOMPASS).Is(RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) && dungeon->GetMap() != RG_NONE && dungeon->GetCompass() != RG_NONE) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto dungeonMapAndCompass = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){ return i == dungeon->GetMap() || i == dungeon->GetCompass();});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AssumedFill(dungeonMapAndCompass, dungeonLocations);
}
}
/*Randomize items restricted to a certain set of locations.
The fill order of location groups is as follows:
- Own Dungeon
- Any Dungeon
- Overworld
Small Keys, Gerudo Keys, Boss Keys, Ganon's Boss Key, and/or dungeon rewards
will be randomized together if they have the same setting. Maps and Compasses
are randomized separately once the dungeon advancement items have all been placed.*/
static void RandomizeDungeonItems() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Get Any Dungeon and Overworld group locations
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> anyDungeonLocations = FilterFromPool(ctx->allLocations, [](const auto loc){return Rando::StaticData::GetLocation(loc)->IsDungeon();});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//overworldLocations defined in item_location.cpp
//Create Any Dungeon and Overworld item pools
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> anyDungeonItems;
std::vector<RandomizerGet> overworldItems;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
for (auto dungeon : ctx->GetDungeons()->GetDungeonList()) {
if (ctx->GetOption(RSK_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_ANY_DUNGEON)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto dungeonKeys = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){return (i == dungeon->GetSmallKey()) || (i == dungeon->GetKeyRing());});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(anyDungeonItems, dungeonKeys);
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_OVERWORLD)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto dungeonKeys = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){return (i == dungeon->GetSmallKey()) || (i == dungeon->GetKeyRing());});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(overworldItems, dungeonKeys);
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_BOSS_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_ANY_DUNGEON) && dungeon->GetBossKey() != RG_GANONS_CASTLE_BOSS_KEY) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto bossKey = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){return i == dungeon->GetBossKey();});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(anyDungeonItems, bossKey);
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_BOSS_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_OVERWORLD) && dungeon->GetBossKey() != RG_GANONS_CASTLE_BOSS_KEY) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto bossKey = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){return i == dungeon->GetBossKey();});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(overworldItems, bossKey);
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_GANONS_BOSS_KEY).Is(RO_GANON_BOSS_KEY_ANY_DUNGEON)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ganonBossKey = FilterAndEraseFromPool(ItemPool, [](const auto i){return i == RG_GANONS_CASTLE_BOSS_KEY;});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(anyDungeonItems, ganonBossKey);
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_GANONS_BOSS_KEY).Is(RO_GANON_BOSS_KEY_OVERWORLD)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ganonBossKey = FilterAndEraseFromPool(ItemPool, [](const auto i) { return i == RG_GANONS_CASTLE_BOSS_KEY; });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(overworldItems, ganonBossKey);
}
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_GERUDO_KEYS).Is(RO_GERUDO_KEYS_ANY_DUNGEON)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto gerudoKeys = FilterAndEraseFromPool(ItemPool, [](const auto i) { return i == RG_GERUDO_FORTRESS_SMALL_KEY; });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(anyDungeonItems, gerudoKeys);
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_GERUDO_KEYS).Is(RO_GERUDO_KEYS_OVERWORLD)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto gerudoKeys = FilterAndEraseFromPool(ItemPool, [](const auto i) { return i == RG_GERUDO_FORTRESS_SMALL_KEY; });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(overworldItems, gerudoKeys);
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHUFFLE_DUNGEON_REWARDS).Is(RO_DUNGEON_REWARDS_ANY_DUNGEON)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
auto rewards = FilterAndEraseFromPool(
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ItemPool, [](const auto i) { return Rando::StaticData::RetrieveItem(i).GetItemType() == ITEMTYPE_DUNGEONREWARD; });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(anyDungeonItems, rewards);
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_SHUFFLE_DUNGEON_REWARDS).Is(RO_DUNGEON_REWARDS_OVERWORLD)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
auto rewards = FilterAndEraseFromPool(
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ItemPool, [](const auto i) { return Rando::StaticData::RetrieveItem(i).GetItemType() == ITEMTYPE_DUNGEONREWARD; });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AddElementsToPool(overworldItems, rewards);
}
//Randomize Any Dungeon and Overworld pools
AssumedFill(anyDungeonItems, anyDungeonLocations, true);
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
AssumedFill(overworldItems, Rando::StaticData::overworldLocations, true);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Randomize maps and compasses after since they're not advancement items
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
for (auto dungeon : ctx->GetDungeons()->GetDungeonList()) {
if (ctx->GetOption(RSK_SHUFFLE_MAPANDCOMPASS).Is(RO_DUNGEON_ITEM_LOC_ANY_DUNGEON)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto mapAndCompassItems = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){return i == dungeon->GetMap() || i == dungeon->GetCompass();});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AssumedFill(mapAndCompassItems, anyDungeonLocations, true);
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_SHUFFLE_MAPANDCOMPASS).Is(RO_DUNGEON_ITEM_LOC_OVERWORLD)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto mapAndCompassItems = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){return i == dungeon->GetMap() || i == dungeon->GetCompass();});
AssumedFill(mapAndCompassItems, Rando::StaticData::overworldLocations, true);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
}
static void RandomizeLinksPocket() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_LINKS_POCKET).Is(RO_LINKS_POCKET_ADVANCEMENT)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Get all the advancement items don't include tokens
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> advancementItems = FilterAndEraseFromPool(ItemPool, [](const auto i) {
return Rando::StaticData::RetrieveItem(i).IsAdvancement() && Rando::StaticData::RetrieveItem(i).GetItemType() != ITEMTYPE_TOKEN;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
});
//select a random one
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
RandomizerGet startingItem = RandomElement(advancementItems, true);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//add the others back
AddElementsToPool(ItemPool, advancementItems);
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->PlaceItemInLocation(RC_LINKS_POCKET, startingItem);
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_LINKS_POCKET).Is(RO_LINKS_POCKET_NOTHING)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->PlaceItemInLocation(RC_LINKS_POCKET, RG_GREEN_RUPEE);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
void VanillaFill() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Perform minimum needed initialization
AreaTable_Init();
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->GenerateLocationPool();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
GenerateItemPool();
GenerateStartingInventory();
//Place vanilla item in each location
RandomizeDungeonRewards();
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (RandomizerCheck loc : ctx->allLocations) {
ctx->GetItemLocation(loc)->PlaceVanillaItem();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
//If necessary, handle ER stuff
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHUFFLE_ENTRANCES)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
printf("\x1b[7;10HShuffling Entrances...");
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
ctx->GetEntranceShuffler()->ShuffleAllEntrances();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
printf("\x1b[7;32HDone");
}
2023-12-04 12:29:48 -05:00
// Populate the playthrough for entrances so they are placed in the spoiler log
GeneratePlaythrough();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Finish up
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->CreateItemOverrides();
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
ctx->GetEntranceShuffler()->CreateEntranceOverrides();
CreateWarpSongTexts();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
void ClearProgress() {
printf("\x1b[7;32H "); // Done
printf("\x1b[8;10H "); // Placing Items...Done
printf("\x1b[9;10H "); // Calculating Playthrough...Done
printf("\x1b[10;10H "); // Creating Hints...Done
printf("\x1b[11;10H "); // Writing Spoiler Log...Done
}
int Fill() {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
auto ctx = Rando::Context::GetInstance();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
int retries = 0;
while(retries < 5) {
placementFailure = false;
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
//showItemProgress = false;
ctx->playthroughLocations.clear();
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
ctx->GetEntranceShuffler()->playthroughEntrances.clear();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
AreaTable_Init(); //Reset the world graph to intialize the proper locations
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->ItemReset(); //Reset shops incase of shopsanity random
ctx->GenerateLocationPool();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
GenerateItemPool();
GenerateStartingInventory();
RemoveStartingItemsFromPool();
FillExcludedLocations();
//Temporarily add shop items to the ItemPool so that entrance randomization
//can validate the world using deku/hylian shields
AddElementsToPool(ItemPool, GetMinVanillaShopItems(32)); //assume worst case shopsanity 4
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHUFFLE_ENTRANCES)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
printf("\x1b[7;10HShuffling Entrances");
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetEntranceShuffler()->ShuffleAllEntrances() == ENTRANCE_SHUFFLE_FAILURE) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
retries++;
ClearProgress();
continue;
}
printf("\x1b[7;32HDone");
}
SetAreas();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//erase temporary shop items
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
FilterAndEraseFromPool(ItemPool, [](const auto item) { return Rando::StaticData::RetrieveItem(item).GetItemType() == ITEMTYPE_SHOP; });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
//ctx->showItemProgress = true;
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Place shop items first, since a buy shield is needed to place a dungeon reward on Gohma due to access
NonShopItems = {};
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHOPSANITY).Is(RO_SHOPSANITY_OFF)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
PlaceVanillaShopItems(); //Place vanilla shop items in vanilla location
} else {
int total_replaced = 0;
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHOPSANITY).IsNot(RO_SHOPSANITY_ZERO_ITEMS)) { //Shopsanity 1-4, random
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Initialize NonShopItems
ItemAndPrice init;
init.Name = Text{"No Item", "Sin objeto", "Pas d'objet"};
init.Price = -1;
init.Repurchaseable = false;
NonShopItems.assign(32, init);
//Indices from OoTR. So shopsanity one will overwrite 7, three will overwrite 7, 5, 8, etc.
const std::array<int, 4> indices = {7, 5, 8, 6};
//Overwrite appropriate number of shop items
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (size_t i = 0; i < Rando::StaticData::shopLocationLists.size(); i++) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
int num_to_replace = GetShopsanityReplaceAmount(); //1-4 shop items will be overwritten, depending on settings
total_replaced += num_to_replace;
for (int j = 0; j < num_to_replace; j++) {
int itemindex = indices[j];
int shopsanityPrice = GetRandomShopPrice();
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
NonShopItems[TransformShopIndex(i * 8 + itemindex - 1)].Price =
shopsanityPrice; // Set price to be retrieved by the patch and textboxes
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
ctx->GetItemLocation(Rando::StaticData::shopLocationLists[i][itemindex - 1])->SetCustomPrice(shopsanityPrice);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
}
}
//Get all locations and items that don't have a shopsanity price attached
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> shopLocations = {};
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Get as many vanilla shop items as the total number of shop items minus the number of replaced items
//So shopsanity 0 will get all 64 vanilla items, shopsanity 4 will get 32, etc.
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> shopItems = GetMinVanillaShopItems(total_replaced);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (size_t i = 0; i < Rando::StaticData::shopLocationLists.size(); i++) {
for (size_t j = 0; j < Rando::StaticData::shopLocationLists[i].size(); j++) {
RandomizerCheck loc = Rando::StaticData::shopLocationLists[i][j];
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (!(ctx->GetItemLocation(loc)->HasCustomPrice())) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
shopLocations.push_back(loc);
}
}
}
//Place the shop items which will still be at shop locations
AssumedFill(shopItems, shopLocations);
}
//Place dungeon rewards
RandomizeDungeonRewards();
//Place dungeon items restricted to their Own Dungeon
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
for (auto dungeon : ctx->GetDungeons()->GetDungeonList()) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
RandomizeOwnDungeon(dungeon);
}
//Then Place songs if song shuffle is set to specific locations
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHUFFLE_SONGS).IsNot(RO_SONG_SHUFFLE_ANYWHERE)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Get each song
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> songs = FilterAndEraseFromPool(
ItemPool, [](const auto i) { return Rando::StaticData::RetrieveItem(i).GetItemType() == ITEMTYPE_SONG; });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Get each song location
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerCheck> songLocations;
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_SONG_LOCATIONS)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
songLocations = FilterFromPool(
ctx->allLocations, [](const auto loc) { return Rando::StaticData::GetLocation(loc)->IsCategory(Category::cSong); });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_SHUFFLE_SONGS).Is(RO_SONG_SHUFFLE_DUNGEON_REWARDS)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
songLocations = FilterFromPool(ctx->allLocations, [](const auto loc) {
return Rando::StaticData::GetLocation(loc)->IsCategory(Category::cSongDungeonReward);
});
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
}
AssumedFill(songs, songLocations, true);
}
//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
RandomizeLinksPocket();
//Then place the rest of the advancement items
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> remainingAdvancementItems =
FilterAndEraseFromPool(ItemPool, [](const auto i) { return Rando::StaticData::RetrieveItem(i).IsAdvancement(); });
AssumedFill(remainingAdvancementItems, ctx->allLocations, true);
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
//Fast fill for the rest of the pool
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
std::vector<RandomizerGet> remainingPool = FilterAndEraseFromPool(ItemPool, [](const auto i) { return true; });
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
FastFill(remainingPool, GetAllEmptyLocations(), false);
Randomizer v2 (#1065) * Revert changes to GetItemFromGet * Fixes Ganon's Boss Key shuffled while regular boss Keys aren't. * Enum + combo box * Add obtainability checks correctly * combobox title rename + no number tracking * Fix repeatable purchases and bottles rendering incorrectly * Move shopsanity option in GUI * Struct instead of ImVec + basic comportment for all case * Attempt to fix odd build issue * Cast randoGet for ganons boss key * Remove redundancy in KD room * Update logic Cvar names * Fix Ganons Trials coming from old save files. Fixes #1365 * Fixes crash when entering Ganon's Castle lobby on linux. * Makes `Item_Give` safe to use with a NULL globalCtx. This should allow it's use for giving items to Link's Pocket during rando save initialization. * Converts Song from Impa to use `Item_Give` * Adds more options for Link's starting item. * Removes unneeded `GiveLinkItem` functions. * and make it build * bring back new rando dropdown * gSaveContext access in GameMenuBar.cpp * Implement Skip Scarecrow's Song * Reimplement progressive Bombchus * Rando-next: Deku Nut and Seed ammo gives a blue rupee Fixes #1390 * Fixes Link starting with BGS * Persist item tracker notes * Adjust Hooks include * Use SohImGui::RequestCvarSaveOnNextTick * Fix issues from LUS refactor * Fix for overriding deku scrub messages * Fix mistake from merge oops * Restore checkboxes to enhancements menu These got lost in the merge * Update location access logic Including MQ locations in Spirit and GC now * Implement rando bombchu drops * Missing break * Simplify mudwall collision check There was no need to have a second collider specifically for Ice Arrow hits * Update settings.cpp * Simplify mudwall collision check * Restore checkboxes in menu Accidentally lost these during merge * Clean up bool * Update logic Cvar name * Fixed capacity on ammmo tracking * Fix for beans obtainability * Hook into file delete and clear notes * Incorporate magic arrows in rando settings * Update tooltip To inform the player that they might have to reload the room if they're enabling this for the first time. * Update tooltip * Add line break in tooltip * Tooltip wording + line break * tweak on main logic * All color logic for all types * Fix: changes to please new LUS * Ensure itemTrackerNotes vector is not fully empty * Implement's Tycoon Wallet. * Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options * small tweaks and rename * always display XX/YY when in ammo/capacity mode * Move all merchant messages to be generated on file load * added hovertext for the number display * Swap german and french translations for shop messages * Set key colors to be on by default * Add another flag to skip mask shop * Fix Sold Out bug * Fix gerudo keys, add disabled checkbox * tooltip line break * Add trials required and merchant prices to save file instead of loading from active spoiler log * Remove trialsRequired persisting in save manager * Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem. * Fix issue when merchantPrices is empty * Fix for a single zeroed merchantPrice entry * Fix #1417 * Implements items selling out and fixes issues with purchasing some items. * Fixes order of operations so Rupees will be spent. * Fixes sold out items not getting overwritten by the randomized info. * Clarify var names and comments Also preserve chain platform cutscene in spirit based on Link's position * Remove !=0 from cvar check * Clarify var names and comments * Rename randomizerMerchantPrices to merchantPrices * Handle shop items in SaveManager * Fix merge mistake * Base whats in the bazaar shop on entranceIndex instead of age * Tidy up chain platform cutscene check * Fix merge error Didn't mean to have Zhora changes in here yet * Use 3drando item table for parsing spoiler names * Use another nested method instead of one at the top level to fetch the table * Add missing newline * Remove log * Respect custom draw functions * Fix issues with rendering songs * Fix localized item names for shopsanity * Implements a larger array of Sprites for the Icon Hash. * Uses the hash instead of seed for spoilerfile name and icons. * Removes some unused functions and variables in `spoiler_log.cpp` * Prevents leading 0s added to hash from being in file name * Changes filename format to icon indexes separated by dashes * Hopefully makes Jenkins happy * Hopefully makes Jenkins happy * [Rando] Child Gerudo Fortress 37th Heartpiece randomized Fixes #1071 * Add descriptions to save editor flags editor, and added randomizer flags (#1386) * Add descriptions to save editor flags editor, and added randomizer flags * Hide randomizer flags when not on a randomizer save * Move flag descriptions to header file * Update soh/soh/Enhancements/debugger/debugSaveEditor.h * Update soh/soh/Enhancements/debugger/debugSaveEditor.h * Fix merge error * crash on pause menu on linux (only in appimage) Fixes #1437 * Applies fix to Song from Impa as well. * Allow buying tunics as child when shopsanity is on * Fix for custom draw methods overriding sold out sign * Simplify logic around shopsanity and fix some issues * Fix dungeon reward stone rotation and add particles * Fix some issues with ice traps * Fix adult wallet having its own max capacity * Fix amount of keys given for BotW * format * Use EnGirlAShopItem enum instead of raw hex values * [#1434] Renders non-warp songs more consistently with warp songs * A few changes around merchant messages * Various changes from PR feedback * Rando: Junk Hint missing french translation * Typo * Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM * Replace magic numbers in message handler * Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Fix BGS softlock for shopsanity * Support tycoon wallet on tracker * Revert "Fix BGS softlock for shopsanity" This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f. * [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes * Implements some necessary plumbing and resolves several Ice Trap Softlocks. Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.) Sets this value from chests and item00 actors. Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa. Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps). Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending. None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING. OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check. Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check. * fix bgs check in player * move bgs logic for tokensanity into MOD_NONE check * set bgs flag before `Item_Give`ing * move bgs flag into `MOD_NONE` check in girla * use existing check in `z_player` * Adds comment explaining the decision to default ITEM_FROM_NPC. * Rename pendingIceTraps to pendingIceTrapCount * Adds some RANDOTODO comments about cleaning up a couple things. * Merge branch 'develop-zhora' into ztornn * manually restore changes to `z_player.c` * Fix after some ice trap prepwork from earlier * Actual fix * Woops * More rupee names * Actually fix it * Add back comment * Fix Skip Scarecrow Song * Fix ruto's letter and LH sun stick rendering * Also fixes it for treasure chest game * Tweak: Rando French Wallet * ADD: French Tycoon * Hide dungeon items/notes by default * [#1301] Fix issue with UI not restoring after getting an item from biggoron * Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c * Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c * Fix random crash that only affected one person for some reason Co-authored-by: Garrett Cox <garrettjcox@gmail.com> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Sarge-117 <adam_branston@outlook.com> Co-authored-by: briaguya <briaguya@alice> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: lil David <1337lilDavid@gmail.com> Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com> Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
//Add prices for scrubsanity, this is unique to SoH because we write/read scrub prices to/from the spoilerfile.
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
if (ctx->GetOption(RSK_SHUFFLE_SCRUBS).Is(RO_SCRUBS_AFFORDABLE)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (size_t i = 0; i < Rando::StaticData::scrubLocations.size(); i++) {
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
ctx->GetItemLocation(Rando::StaticData::scrubLocations[i])->SetCustomPrice(10);
Randomizer v2 (#1065) * Revert changes to GetItemFromGet * Fixes Ganon's Boss Key shuffled while regular boss Keys aren't. * Enum + combo box * Add obtainability checks correctly * combobox title rename + no number tracking * Fix repeatable purchases and bottles rendering incorrectly * Move shopsanity option in GUI * Struct instead of ImVec + basic comportment for all case * Attempt to fix odd build issue * Cast randoGet for ganons boss key * Remove redundancy in KD room * Update logic Cvar names * Fix Ganons Trials coming from old save files. Fixes #1365 * Fixes crash when entering Ganon's Castle lobby on linux. * Makes `Item_Give` safe to use with a NULL globalCtx. This should allow it's use for giving items to Link's Pocket during rando save initialization. * Converts Song from Impa to use `Item_Give` * Adds more options for Link's starting item. * Removes unneeded `GiveLinkItem` functions. * and make it build * bring back new rando dropdown * gSaveContext access in GameMenuBar.cpp * Implement Skip Scarecrow's Song * Reimplement progressive Bombchus * Rando-next: Deku Nut and Seed ammo gives a blue rupee Fixes #1390 * Fixes Link starting with BGS * Persist item tracker notes * Adjust Hooks include * Use SohImGui::RequestCvarSaveOnNextTick * Fix issues from LUS refactor * Fix for overriding deku scrub messages * Fix mistake from merge oops * Restore checkboxes to enhancements menu These got lost in the merge * Update location access logic Including MQ locations in Spirit and GC now * Implement rando bombchu drops * Missing break * Simplify mudwall collision check There was no need to have a second collider specifically for Ice Arrow hits * Update settings.cpp * Simplify mudwall collision check * Restore checkboxes in menu Accidentally lost these during merge * Clean up bool * Update logic Cvar name * Fixed capacity on ammmo tracking * Fix for beans obtainability * Hook into file delete and clear notes * Incorporate magic arrows in rando settings * Update tooltip To inform the player that they might have to reload the room if they're enabling this for the first time. * Update tooltip * Add line break in tooltip * Tooltip wording + line break * tweak on main logic * All color logic for all types * Fix: changes to please new LUS * Ensure itemTrackerNotes vector is not fully empty * Implement's Tycoon Wallet. * Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options * small tweaks and rename * always display XX/YY when in ammo/capacity mode * Move all merchant messages to be generated on file load * added hovertext for the number display * Swap german and french translations for shop messages * Set key colors to be on by default * Add another flag to skip mask shop * Fix Sold Out bug * Fix gerudo keys, add disabled checkbox * tooltip line break * Add trials required and merchant prices to save file instead of loading from active spoiler log * Remove trialsRequired persisting in save manager * Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem. * Fix issue when merchantPrices is empty * Fix for a single zeroed merchantPrice entry * Fix #1417 * Implements items selling out and fixes issues with purchasing some items. * Fixes order of operations so Rupees will be spent. * Fixes sold out items not getting overwritten by the randomized info. * Clarify var names and comments Also preserve chain platform cutscene in spirit based on Link's position * Remove !=0 from cvar check * Clarify var names and comments * Rename randomizerMerchantPrices to merchantPrices * Handle shop items in SaveManager * Fix merge mistake * Base whats in the bazaar shop on entranceIndex instead of age * Tidy up chain platform cutscene check * Fix merge error Didn't mean to have Zhora changes in here yet * Use 3drando item table for parsing spoiler names * Use another nested method instead of one at the top level to fetch the table * Add missing newline * Remove log * Respect custom draw functions * Fix issues with rendering songs * Fix localized item names for shopsanity * Implements a larger array of Sprites for the Icon Hash. * Uses the hash instead of seed for spoilerfile name and icons. * Removes some unused functions and variables in `spoiler_log.cpp` * Prevents leading 0s added to hash from being in file name * Changes filename format to icon indexes separated by dashes * Hopefully makes Jenkins happy * Hopefully makes Jenkins happy * [Rando] Child Gerudo Fortress 37th Heartpiece randomized Fixes #1071 * Add descriptions to save editor flags editor, and added randomizer flags (#1386) * Add descriptions to save editor flags editor, and added randomizer flags * Hide randomizer flags when not on a randomizer save * Move flag descriptions to header file * Update soh/soh/Enhancements/debugger/debugSaveEditor.h * Update soh/soh/Enhancements/debugger/debugSaveEditor.h * Fix merge error * crash on pause menu on linux (only in appimage) Fixes #1437 * Applies fix to Song from Impa as well. * Allow buying tunics as child when shopsanity is on * Fix for custom draw methods overriding sold out sign * Simplify logic around shopsanity and fix some issues * Fix dungeon reward stone rotation and add particles * Fix some issues with ice traps * Fix adult wallet having its own max capacity * Fix amount of keys given for BotW * format * Use EnGirlAShopItem enum instead of raw hex values * [#1434] Renders non-warp songs more consistently with warp songs * A few changes around merchant messages * Various changes from PR feedback * Rando: Junk Hint missing french translation * Typo * Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM * Replace magic numbers in message handler * Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Fix BGS softlock for shopsanity * Support tycoon wallet on tracker * Revert "Fix BGS softlock for shopsanity" This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f. * [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes * Implements some necessary plumbing and resolves several Ice Trap Softlocks. Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.) Sets this value from chests and item00 actors. Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa. Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps). Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending. None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING. OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check. Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check. * fix bgs check in player * move bgs logic for tokensanity into MOD_NONE check * set bgs flag before `Item_Give`ing * move bgs flag into `MOD_NONE` check in girla * use existing check in `z_player` * Adds comment explaining the decision to default ITEM_FROM_NPC. * Rename pendingIceTraps to pendingIceTrapCount * Adds some RANDOTODO comments about cleaning up a couple things. * Merge branch 'develop-zhora' into ztornn * manually restore changes to `z_player.c` * Fix after some ice trap prepwork from earlier * Actual fix * Woops * More rupee names * Actually fix it * Add back comment * Fix Skip Scarecrow Song * Fix ruto's letter and LH sun stick rendering * Also fixes it for treasure chest game * Tweak: Rando French Wallet * ADD: French Tycoon * Hide dungeon items/notes by default * [#1301] Fix issue with UI not restoring after getting an item from biggoron * Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c * Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c * Fix random crash that only affected one person for some reason Co-authored-by: Garrett Cox <garrettjcox@gmail.com> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Sarge-117 <adam_branston@outlook.com> Co-authored-by: briaguya <briaguya@alice> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: lil David <1337lilDavid@gmail.com> Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com> Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
}
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
} else if (ctx->GetOption(RSK_SHUFFLE_SCRUBS).Is(RO_SCRUBS_RANDOM)) {
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
for (size_t i = 0; i < Rando::StaticData::scrubLocations.size(); i++) {
Randomizer v2 (#1065) * Revert changes to GetItemFromGet * Fixes Ganon's Boss Key shuffled while regular boss Keys aren't. * Enum + combo box * Add obtainability checks correctly * combobox title rename + no number tracking * Fix repeatable purchases and bottles rendering incorrectly * Move shopsanity option in GUI * Struct instead of ImVec + basic comportment for all case * Attempt to fix odd build issue * Cast randoGet for ganons boss key * Remove redundancy in KD room * Update logic Cvar names * Fix Ganons Trials coming from old save files. Fixes #1365 * Fixes crash when entering Ganon's Castle lobby on linux. * Makes `Item_Give` safe to use with a NULL globalCtx. This should allow it's use for giving items to Link's Pocket during rando save initialization. * Converts Song from Impa to use `Item_Give` * Adds more options for Link's starting item. * Removes unneeded `GiveLinkItem` functions. * and make it build * bring back new rando dropdown * gSaveContext access in GameMenuBar.cpp * Implement Skip Scarecrow's Song * Reimplement progressive Bombchus * Rando-next: Deku Nut and Seed ammo gives a blue rupee Fixes #1390 * Fixes Link starting with BGS * Persist item tracker notes * Adjust Hooks include * Use SohImGui::RequestCvarSaveOnNextTick * Fix issues from LUS refactor * Fix for overriding deku scrub messages * Fix mistake from merge oops * Restore checkboxes to enhancements menu These got lost in the merge * Update location access logic Including MQ locations in Spirit and GC now * Implement rando bombchu drops * Missing break * Simplify mudwall collision check There was no need to have a second collider specifically for Ice Arrow hits * Update settings.cpp * Simplify mudwall collision check * Restore checkboxes in menu Accidentally lost these during merge * Clean up bool * Update logic Cvar name * Fixed capacity on ammmo tracking * Fix for beans obtainability * Hook into file delete and clear notes * Incorporate magic arrows in rando settings * Update tooltip To inform the player that they might have to reload the room if they're enabling this for the first time. * Update tooltip * Add line break in tooltip * Tooltip wording + line break * tweak on main logic * All color logic for all types * Fix: changes to please new LUS * Ensure itemTrackerNotes vector is not fully empty * Implement's Tycoon Wallet. * Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options * small tweaks and rename * always display XX/YY when in ammo/capacity mode * Move all merchant messages to be generated on file load * added hovertext for the number display * Swap german and french translations for shop messages * Set key colors to be on by default * Add another flag to skip mask shop * Fix Sold Out bug * Fix gerudo keys, add disabled checkbox * tooltip line break * Add trials required and merchant prices to save file instead of loading from active spoiler log * Remove trialsRequired persisting in save manager * Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem. * Fix issue when merchantPrices is empty * Fix for a single zeroed merchantPrice entry * Fix #1417 * Implements items selling out and fixes issues with purchasing some items. * Fixes order of operations so Rupees will be spent. * Fixes sold out items not getting overwritten by the randomized info. * Clarify var names and comments Also preserve chain platform cutscene in spirit based on Link's position * Remove !=0 from cvar check * Clarify var names and comments * Rename randomizerMerchantPrices to merchantPrices * Handle shop items in SaveManager * Fix merge mistake * Base whats in the bazaar shop on entranceIndex instead of age * Tidy up chain platform cutscene check * Fix merge error Didn't mean to have Zhora changes in here yet * Use 3drando item table for parsing spoiler names * Use another nested method instead of one at the top level to fetch the table * Add missing newline * Remove log * Respect custom draw functions * Fix issues with rendering songs * Fix localized item names for shopsanity * Implements a larger array of Sprites for the Icon Hash. * Uses the hash instead of seed for spoilerfile name and icons. * Removes some unused functions and variables in `spoiler_log.cpp` * Prevents leading 0s added to hash from being in file name * Changes filename format to icon indexes separated by dashes * Hopefully makes Jenkins happy * Hopefully makes Jenkins happy * [Rando] Child Gerudo Fortress 37th Heartpiece randomized Fixes #1071 * Add descriptions to save editor flags editor, and added randomizer flags (#1386) * Add descriptions to save editor flags editor, and added randomizer flags * Hide randomizer flags when not on a randomizer save * Move flag descriptions to header file * Update soh/soh/Enhancements/debugger/debugSaveEditor.h * Update soh/soh/Enhancements/debugger/debugSaveEditor.h * Fix merge error * crash on pause menu on linux (only in appimage) Fixes #1437 * Applies fix to Song from Impa as well. * Allow buying tunics as child when shopsanity is on * Fix for custom draw methods overriding sold out sign * Simplify logic around shopsanity and fix some issues * Fix dungeon reward stone rotation and add particles * Fix some issues with ice traps * Fix adult wallet having its own max capacity * Fix amount of keys given for BotW * format * Use EnGirlAShopItem enum instead of raw hex values * [#1434] Renders non-warp songs more consistently with warp songs * A few changes around merchant messages * Various changes from PR feedback * Rando: Junk Hint missing french translation * Typo * Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM * Replace magic numbers in message handler * Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Fix BGS softlock for shopsanity * Support tycoon wallet on tracker * Revert "Fix BGS softlock for shopsanity" This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f. * [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes * Implements some necessary plumbing and resolves several Ice Trap Softlocks. Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.) Sets this value from chests and item00 actors. Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa. Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps). Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending. None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING. OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check. Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check. * fix bgs check in player * move bgs logic for tokensanity into MOD_NONE check * set bgs flag before `Item_Give`ing * move bgs flag into `MOD_NONE` check in girla * use existing check in `z_player` * Adds comment explaining the decision to default ITEM_FROM_NPC. * Rename pendingIceTraps to pendingIceTrapCount * Adds some RANDOTODO comments about cleaning up a couple things. * Merge branch 'develop-zhora' into ztornn * manually restore changes to `z_player.c` * Fix after some ice trap prepwork from earlier * Actual fix * Woops * More rupee names * Actually fix it * Add back comment * Fix Skip Scarecrow Song * Fix ruto's letter and LH sun stick rendering * Also fixes it for treasure chest game * Tweak: Rando French Wallet * ADD: French Tycoon * Hide dungeon items/notes by default * [#1301] Fix issue with UI not restoring after getting an item from biggoron * Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c * Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c * Fix random crash that only affected one person for some reason Co-authored-by: Garrett Cox <garrettjcox@gmail.com> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Sarge-117 <adam_branston@outlook.com> Co-authored-by: briaguya <briaguya@alice> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: lil David <1337lilDavid@gmail.com> Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com> Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
int randomPrice = GetRandomScrubPrice();
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
ctx->GetItemLocation(Rando::StaticData::scrubLocations[i])->SetCustomPrice(randomPrice);
Randomizer v2 (#1065) * Revert changes to GetItemFromGet * Fixes Ganon's Boss Key shuffled while regular boss Keys aren't. * Enum + combo box * Add obtainability checks correctly * combobox title rename + no number tracking * Fix repeatable purchases and bottles rendering incorrectly * Move shopsanity option in GUI * Struct instead of ImVec + basic comportment for all case * Attempt to fix odd build issue * Cast randoGet for ganons boss key * Remove redundancy in KD room * Update logic Cvar names * Fix Ganons Trials coming from old save files. Fixes #1365 * Fixes crash when entering Ganon's Castle lobby on linux. * Makes `Item_Give` safe to use with a NULL globalCtx. This should allow it's use for giving items to Link's Pocket during rando save initialization. * Converts Song from Impa to use `Item_Give` * Adds more options for Link's starting item. * Removes unneeded `GiveLinkItem` functions. * and make it build * bring back new rando dropdown * gSaveContext access in GameMenuBar.cpp * Implement Skip Scarecrow's Song * Reimplement progressive Bombchus * Rando-next: Deku Nut and Seed ammo gives a blue rupee Fixes #1390 * Fixes Link starting with BGS * Persist item tracker notes * Adjust Hooks include * Use SohImGui::RequestCvarSaveOnNextTick * Fix issues from LUS refactor * Fix for overriding deku scrub messages * Fix mistake from merge oops * Restore checkboxes to enhancements menu These got lost in the merge * Update location access logic Including MQ locations in Spirit and GC now * Implement rando bombchu drops * Missing break * Simplify mudwall collision check There was no need to have a second collider specifically for Ice Arrow hits * Update settings.cpp * Simplify mudwall collision check * Restore checkboxes in menu Accidentally lost these during merge * Clean up bool * Update logic Cvar name * Fixed capacity on ammmo tracking * Fix for beans obtainability * Hook into file delete and clear notes * Incorporate magic arrows in rando settings * Update tooltip To inform the player that they might have to reload the room if they're enabling this for the first time. * Update tooltip * Add line break in tooltip * Tooltip wording + line break * tweak on main logic * All color logic for all types * Fix: changes to please new LUS * Ensure itemTrackerNotes vector is not fully empty * Implement's Tycoon Wallet. * Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options * small tweaks and rename * always display XX/YY when in ammo/capacity mode * Move all merchant messages to be generated on file load * added hovertext for the number display * Swap german and french translations for shop messages * Set key colors to be on by default * Add another flag to skip mask shop * Fix Sold Out bug * Fix gerudo keys, add disabled checkbox * tooltip line break * Add trials required and merchant prices to save file instead of loading from active spoiler log * Remove trialsRequired persisting in save manager * Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem. * Fix issue when merchantPrices is empty * Fix for a single zeroed merchantPrice entry * Fix #1417 * Implements items selling out and fixes issues with purchasing some items. * Fixes order of operations so Rupees will be spent. * Fixes sold out items not getting overwritten by the randomized info. * Clarify var names and comments Also preserve chain platform cutscene in spirit based on Link's position * Remove !=0 from cvar check * Clarify var names and comments * Rename randomizerMerchantPrices to merchantPrices * Handle shop items in SaveManager * Fix merge mistake * Base whats in the bazaar shop on entranceIndex instead of age * Tidy up chain platform cutscene check * Fix merge error Didn't mean to have Zhora changes in here yet * Use 3drando item table for parsing spoiler names * Use another nested method instead of one at the top level to fetch the table * Add missing newline * Remove log * Respect custom draw functions * Fix issues with rendering songs * Fix localized item names for shopsanity * Implements a larger array of Sprites for the Icon Hash. * Uses the hash instead of seed for spoilerfile name and icons. * Removes some unused functions and variables in `spoiler_log.cpp` * Prevents leading 0s added to hash from being in file name * Changes filename format to icon indexes separated by dashes * Hopefully makes Jenkins happy * Hopefully makes Jenkins happy * [Rando] Child Gerudo Fortress 37th Heartpiece randomized Fixes #1071 * Add descriptions to save editor flags editor, and added randomizer flags (#1386) * Add descriptions to save editor flags editor, and added randomizer flags * Hide randomizer flags when not on a randomizer save * Move flag descriptions to header file * Update soh/soh/Enhancements/debugger/debugSaveEditor.h * Update soh/soh/Enhancements/debugger/debugSaveEditor.h * Fix merge error * crash on pause menu on linux (only in appimage) Fixes #1437 * Applies fix to Song from Impa as well. * Allow buying tunics as child when shopsanity is on * Fix for custom draw methods overriding sold out sign * Simplify logic around shopsanity and fix some issues * Fix dungeon reward stone rotation and add particles * Fix some issues with ice traps * Fix adult wallet having its own max capacity * Fix amount of keys given for BotW * format * Use EnGirlAShopItem enum instead of raw hex values * [#1434] Renders non-warp songs more consistently with warp songs * A few changes around merchant messages * Various changes from PR feedback * Rando: Junk Hint missing french translation * Typo * Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM * Replace magic numbers in message handler * Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Fix BGS softlock for shopsanity * Support tycoon wallet on tracker * Revert "Fix BGS softlock for shopsanity" This reverts commit 5fdb961ea460fb9a035cf0bb6ae77bfeedc1de0f. * [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes * Implements some necessary plumbing and resolves several Ice Trap Softlocks. Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.) Sets this value from chests and item00 actors. Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa. Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps). Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending. None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING. OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check. Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check. * fix bgs check in player * move bgs logic for tokensanity into MOD_NONE check * set bgs flag before `Item_Give`ing * move bgs flag into `MOD_NONE` check in girla * use existing check in `z_player` * Adds comment explaining the decision to default ITEM_FROM_NPC. * Rename pendingIceTraps to pendingIceTrapCount * Adds some RANDOTODO comments about cleaning up a couple things. * Merge branch 'develop-zhora' into ztornn * manually restore changes to `z_player.c` * Fix after some ice trap prepwork from earlier * Actual fix * Woops * More rupee names * Actually fix it * Add back comment * Fix Skip Scarecrow Song * Fix ruto's letter and LH sun stick rendering * Also fixes it for treasure chest game * Tweak: Rando French Wallet * ADD: French Tycoon * Hide dungeon items/notes by default * [#1301] Fix issue with UI not restoring after getting an item from biggoron * Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c * Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c * Fix random crash that only affected one person for some reason Co-authored-by: Garrett Cox <garrettjcox@gmail.com> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Sarge-117 <adam_branston@outlook.com> Co-authored-by: briaguya <briaguya@alice> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: lil David <1337lilDavid@gmail.com> Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com> Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2022-09-21 00:50:22 -04:00
}
}
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
GeneratePlaythrough();
//Successful placement, produced beatable result
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
if(ctx->playthroughBeatable && !placementFailure) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
printf("Done");
printf("\x1b[9;10HCalculating Playthrough...");
PareDownPlaythrough();
CalculateWotH();
CalculateBarren();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
printf("Done");
Rando Definition Deduplication (#3284) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries
2023-10-19 19:48:25 -04:00
ctx->CreateItemOverrides();
More gap-bridging (#3323) * Initial StaticData and RandoItem class definitions * Initial implementation of RandoItem class. * Rerranges RandoItem Constructor parameters The parameters were rearranged for easy copy-paste from the GET_ITEM macro calls later on. * Switches static data from map to static array. Array is all that is needed, since the item list will be contiguous and indexed by the RandomizerGet Enum values. * Defines part of the randomizer item list. * Adds more item class instances to item_list.cpp Up through bottles, many more items still to go. * Adds song items * Adds Maps and Compasses to the item_list * Added Key Items to item_list * Added Key Rings to item_list * Added Dungeon Rewards to item_list * Adds generic items and refills to item_list * Adds shop items, triforce, and hints Also added constructors that put the GET_ITEM_NONE data in for these items, since there is no corresponding GetItemEntry for them. * Adds in the stages of progressive items These are present for GetItemEntry purposes, and aren't really meant to be used in seed generation (unless we find a need for it later on.) * Remove GetItemEntry data from progressive items * Moves/adds function definitions to item/item_list * Refactors GetItemEntry data It's now a pointer to memory instantiated on the heap in the constructor. These are shared pointers so the memory is freed if any of the item instances get deconstructed (which they shouldn't but just in case.) * Adds item class member for if item is progressive * Removes unneeded stuff from initializer list macro * Replaces relevant `uint32_t`s w/ `RandomizerGet`s Also replaces calls to the ItemTable method with StaticData::RetrieveItem * Switches our runtime code to use the new itemList. * Changes just enough hint gen code to compile * Initial Definition of Location Class * Initial Implementation of Location * Fixes some names and definitions. * Extracts ActorID and SceneID enums to separate files. This allows importing them without causing weird conflicts in cpp files when importing the z64scene.h and z64actor.h files directly. Now you can just import z64scene_enum.h and z64actor_enum.h instead. The two old files also import these new files so that existing setups still work as expected. * Replaces the forward definitions with the new imports. * Adds missing data for RandomizerCheckObjects. * Definition and first entry of locationTable * Added Mido's House Locations * Added locations up through lost woods. * Adds in Hyrule Field locations. * Adds Lake Hylia locations * Adds location name comments * Adds Gerudo Valley Locations * Adds Gerudo Fortress locations. * Adds the Wasteland and Collosus locations * Adds Market locations * Adds Hyrule Castle locations. * Adds Kakariko and Graveyard locations. * Adds Death Mountain checks. * Adds Goron City locations * Adds Death Mountain Crater locations * Adds Zora's River locations * Added Zora's Domain Locations. * Added Zora's Fountain locations * Adds Lon Lon Ranch locations. * Adds Deku Tree locations * Adds Dodongo's Cavern Locations. * Adds Jabu Jabu's Belly Locations * Adds Forest Temple Locations * Adds Fire Temple Locations * Adds Water Temple Locations * Added Spirit Temple Locations * Some of shadow temple locations. * Adds remaining Shadow Temple locations * Fixes a leftover merge conflict * Adds Bottom of the Well locations. * Adds Ice Cavern locations * Adds GTG locations. * Adds Ganon's Castle and Tower locations * Adds dungeon Gold Skulltula locations. * Adds Overworld Gold Skulltula locations * Adds dungeon reward locations * Adds Heart Container Locations * Adds Cutscene and Song locations * Adds Cow locations * Adds Shop locations. * Adds hint locations * Adds function for retrieving the Location data. * Initial definition of ItemLocation structure for tracking runtime data * First push on converting code to use new location definitions * Changes hints to use the new tables * Further conversion of hints to new definitions. * Adds new Hint and Location IDs to area tables * Moves areaTable to use new RandomizerRegion keys * Removal of 3drando/item_location files. * Uses new RandomizerRegion keys in entrance.cpp * Final push for removal of massive keys.hpp enum * Uses new SceneID Enum Values * Remove RandomizerCheckObject structs in favor of new location list. * Fix a few stragglers to successfully build * Rename of RandoItem to just Item, but in the Rando namespace * Adds static hints (Light Arrows, Altar text, etc) to the new Hint table. * More hint related fixes/edits * small fix for #include path * Fix various miscellaneous issues related to seed gen and spoiler parsing. * Handle progressive items correctly. * Fixes some hint generation logic * Fix a few GetItemEntry niche bugs. * Adds missing shop GI Entries * Formatting fixes * small formatting fix * Namespace StaticData under Rando * Added a note about a potential use-after-free. I confirmed the actual pointer in question isn't currently being used, but I added the note as a reminder to fix it later and/or as a warning to anyone who changes how the return value is used. * Fixes missing location table entries * Fixes LUS submodule and removes now-unused code * Resolves weird duplicate definition issue * Fix missing include It was missed because not being included wasn't an issue on Windows. * Fixes error present on Linux builds * Fixes some issues with excluding locations * Updates the Resolve Exclusion conflicts function not sure if actually used, will look into that more later * Removes some duplicate RGs * More fixes of duplicate RG values. * Fix a few duplication issues in the check tracker. * Fix progressive bombchus. * Minor typo fix, shouldn't really be affecting anything though * Should fix some of the remaining check tracker issues. * oops wrong boolean operator * Fix skulltulas in the check tracker. * oops, missing comma * re-formatting of HintStone locations * Fixes issue when picking up second Progressive Bullet Bag * Hide bombchu bowling bombchus * Fixes missed skullScene in location_list * Reformats shop items * Re-formats cow checks * reformat song locations * reformat "cutscene" checks * reformat heart container locaitons * reformat Boss/Dungeon reward checks * Hide Triforce Completed if not playing Triforce Hunt * Fixes incorrect chest param * reformat GS Tokens locations and cuts down on duplicate data * reformat Ganons Castle checks * reformat GTG check locations * Prevents Gift from Raoru from appearing in the check tracker * more reformatting (botw, ice cavern, shadow temple) * Should fix a couple more check tracker checks * reformat spirit temple checks * reformat water and fire temple checks * fix RC_ZR_GS_ABOVE_BRIDGE flag typo * reformat Forest Temple checks * Fix RC_LW_TRADE_ODD_POTION in check tracker * reformat child dungeon locations * reformat overworld locations * reformat item entries * New Item Override system * use new ItemOverrides and use ItemLocations table for getting items * Saves/Loads directly from/to new ItemLocation table with overrides for traps * Removes gSaveContext.itemLocations * Don't load spoiler file on boot automatically. Currently this means the old spoiler will have to be manually dropped or a new one generated in order to make a new rando file. Next I want to make it so that: 1. The Randomizer Quest button on the file select menu is always unlocked, even if a spoiler is not loaded. 2. If it's selected and a spoiler is not loaded, a menu will appear that asks if you want to generate a new seed or re-generate the previous one (if a spoiler file is present). 3. On choosing to generate a new one, you may also get an in-game menu to quickly apply a preset before generating (not sure if I'm going that far just yet). 4. After that, a seed is generated and you are taken back to the file select screen with the new file present. 5. If a seed is generated via the menu ahead of time, the CVar for loading the spoiler file will be set, but the spoiler file will not be parsed. All the data needed to actually play the randomizer at that point is already in memory and in the save file (or at least I'll make it so that it is if it isn't already). 6. If a spoiler file is dropped over the window, the spoiler file is loaded, but it will only be parsed to get the seed and the settings, then the playthrough will be generated from scratch with that data. Thus allowing for hints to be in the user's language of choice no matter what language the spoiler file was generated in. 7. Additionally, there will be a plandomizer mode that, if enabled, causes dragging and dropping a spoiler file to read the entire spoiler file instead of just the seed, and making a new file will use the data from there instead of generating a new seed. This in particular may be expanded to have a "plando file" that contains more info than a spoiler file would normally have, such as cosmetic data and a more fleshed out custom message syntax for various types of custom hints and whatnot. But that will be probably much later. * Auto-gen rando seed when making a new rando file. Also adds new logic for displaying the seed hash icons. Now, it is displayed in the following situations: 1. On the confirmation page when loading a rando save, the hash icons for *that save* are displayed. 2. On the name select screen after generating a seed, the hash icons for the seed that was just generated will be shown. 3. If you have dragged a spoiler log onto the window, the hash icons for that seed will be displayed while randomizer is selected on the quest select screen. Currently the spoiler is just ignored, as the logic for pulling the settings from the spoiler file and regenerating the same seed has not been coded yet. * Fix a few typos/bugs * Partial conversion to new Settings/Option class * Further conversion to new settings/options classes * New settings struct (not fully working, need to wire it up to SaveManager) * Move save files to new settings struct. Also fixes MQ options to match 3drando * Fixes some spoilerfile related issues * Cleans up now unused arrays * Fixes some unhandled entries in parse settings switch case * Reimplements parsing of settings on file drop to re-generate seeds * Move merchantPrices into ItemLocation tables. * Move hints to new struct * Fixes a few seed gen bugs surrounding hints * Fix treasure chest game. * Relocate Entrance Shuffle code into ctx * Move entrances to new context at runtime * Remove now unused code from SaveContext and randomizer.cpp/.h * Fix non-windows builds? * Moves Dungeon Quests to new context * Move trials into new context * Whoops, forgot to construct the Trials in the context. * Fixes accidental nullptr reference * Fixes bug with saving MQ dungeons * Implements plando mode and removes now unused code. Largely untested, expect some bugfixes. * prevent a multiple definition bug * another attempt to fix the gSeedTextures multiple def error * Fixes some minor hint issues from conflict resolution * Some additional glue needed for merge * Fixes another couple of miscellaneous issues/inconsistencies. * A few french corrections * Makes CVar gRandomizeWarpSongText match the checkbox default value.
2023-11-13 13:25:37 -05:00
ctx->GetEntranceShuffler()->CreateEntranceOverrides();
//funny ganon line
Text ganonText = RandomElement(GetHintCategory(HintCategory::GanonLine)).GetText();
CreateMessageFromTextObject(0x70CB, 0, 2, 3, AddColorsAndFormat(ganonText));
SetGanonText(ganonText);
CreateAllHints();
CreateWarpSongTexts();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
return 1;
}
//Unsuccessful placement
if(retries < 4) {
SPDLOG_DEBUG("\nGOT STUCK. RETRYING...\n");
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
Areas::ResetAllLocations();
logic->Reset();
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
ClearProgress();
}
retries++;
}
//All retries failed
return -1;
}