Browse Source

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 5fdb961ea4.

* [#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>
pull/1547/head^2
briaguya 6 months ago committed by GitHub
parent
commit
2b78bea475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      libultraship/libultraship/Hooks.h
  2. 3
      libultraship/libultraship/ImGuiImpl.cpp
  3. 11
      soh/CMakeLists.txt
  4. 6
      soh/include/functions.h
  5. 3
      soh/include/macros.h
  6. 22
      soh/include/message_data_static.h
  7. 25
      soh/include/message_data_textbox_types.h
  8. 11
      soh/include/z64player.h
  9. 8
      soh/include/z64save.h
  10. 26
      soh/soh/Enhancements/custom-message/CustomMessageManager.h
  11. 14
      soh/soh/Enhancements/custom-message/CustomMessageTypes.h
  12. 229
      soh/soh/Enhancements/debugger/debugSaveEditor.cpp
  13. 412
      soh/soh/Enhancements/debugger/debugSaveEditor.h
  14. 29
      soh/soh/Enhancements/item-tables/ItemTableTypes.h
  15. 2
      soh/soh/Enhancements/randomizer/3drando/custom_messages.cpp
  16. 13
      soh/soh/Enhancements/randomizer/3drando/fill.cpp
  17. 3329
      soh/soh/Enhancements/randomizer/3drando/hint_list.cpp
  18. 74
      soh/soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp
  19. 3
      soh/soh/Enhancements/randomizer/3drando/hints.cpp
  20. 10
      soh/soh/Enhancements/randomizer/3drando/item.cpp
  21. 14
      soh/soh/Enhancements/randomizer/3drando/item.hpp
  22. 465
      soh/soh/Enhancements/randomizer/3drando/item_list.cpp
  23. 1
      soh/soh/Enhancements/randomizer/3drando/item_list.hpp
  24. 1609
      soh/soh/Enhancements/randomizer/3drando/item_location.cpp
  25. 71
      soh/soh/Enhancements/randomizer/3drando/item_location.hpp
  26. 10
      soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
  27. 5
      soh/soh/Enhancements/randomizer/3drando/keys.hpp
  28. 2
      soh/soh/Enhancements/randomizer/3drando/location_access/locacc_dodongos_cavern.cpp
  29. 16
      soh/soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp
  30. 10
      soh/soh/Enhancements/randomizer/3drando/location_access/locacc_spirit_temple.cpp
  31. 15
      soh/soh/Enhancements/randomizer/3drando/location_access/locacc_zoras_domain.cpp
  32. 4
      soh/soh/Enhancements/randomizer/3drando/logic.cpp
  33. 19
      soh/soh/Enhancements/randomizer/3drando/menu.cpp
  34. 3
      soh/soh/Enhancements/randomizer/3drando/menu.hpp
  35. 5
      soh/soh/Enhancements/randomizer/3drando/playthrough.cpp
  36. 2
      soh/soh/Enhancements/randomizer/3drando/playthrough.hpp
  37. 10
      soh/soh/Enhancements/randomizer/3drando/rando_main.cpp
  38. 5
      soh/soh/Enhancements/randomizer/3drando/rando_main.hpp
  39. 24
      soh/soh/Enhancements/randomizer/3drando/setting_descriptions.cpp
  40. 7
      soh/soh/Enhancements/randomizer/3drando/setting_descriptions.hpp
  41. 272
      soh/soh/Enhancements/randomizer/3drando/settings.cpp
  42. 21
      soh/soh/Enhancements/randomizer/3drando/settings.hpp
  43. 118
      soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
  44. 12
      soh/soh/Enhancements/randomizer/3drando/trial.cpp
  45. 33
      soh/soh/Enhancements/randomizer/adult_trade_shuffle.c
  46. 13
      soh/soh/Enhancements/randomizer/adult_trade_shuffle.h
  47. 109
      soh/soh/Enhancements/randomizer/draw.cpp
  48. 13
      soh/soh/Enhancements/randomizer/draw.h
  49. 111
      soh/soh/Enhancements/randomizer/rando_hash.h
  50. 6274
      soh/soh/Enhancements/randomizer/randomizer.cpp
  51. 32
      soh/soh/Enhancements/randomizer/randomizer.h
  52. 63
      soh/soh/Enhancements/randomizer/randomizerTypes.h
  53. 972
      soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp
  54. 83
      soh/soh/Enhancements/randomizer/randomizer_check_objects.h
  55. 137
      soh/soh/Enhancements/randomizer/randomizer_inf.h
  56. 1799
      soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp
  57. 24
      soh/soh/Enhancements/randomizer/randomizer_item_tracker.h
  58. 86
      soh/soh/GameMenuBar.cpp
  59. 129
      soh/soh/OTRGlobals.cpp
  60. 13
      soh/soh/OTRGlobals.h
  61. 66
      soh/soh/SaveManager.cpp
  62. 22
      soh/soh/z_message_OTR.cpp
  63. 2
      soh/src/code/code_80097A00.c
  64. 53
      soh/src/code/code_800EC960.c
  65. 16
      soh/src/code/z_actor.c
  66. 24
      soh/src/code/z_draw.c
  67. 36
      soh/src/code/z_en_item00.c
  68. 22
      soh/src/code/z_game_over.c
  69. 2
      soh/src/code/z_kankyo.c
  70. 3
      soh/src/code/z_message_PAL.c
  71. 243
      soh/src/code/z_parameter.c
  72. 6
      soh/src/code/z_play.c
  73. 10
      soh/src/code/z_player_lib.c
  74. 8
      soh/src/code/z_scene_table.c
  75. 510
      soh/src/code/z_sram.c
  76. 2
      soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c
  77. 2
      soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c
  78. 16
      soh/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c
  79. 2
      soh/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c
  80. 3
      soh/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c
  81. 2
      soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c
  82. 13
      soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c
  83. 65
      soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c
  84. 18
      soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
  85. 28
      soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
  86. 3
      soh/src/overlays/actors/ovl_En_Box/z_en_box.c
  87. 115
      soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c
  88. 5
      soh/src/overlays/actors/ovl_En_Cow/z_en_cow.h
  89. 77
      soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c
  90. 1
      soh/src/overlays/actors/ovl_En_Dns/z_en_dns.h
  91. 25
      soh/src/overlays/actors/ovl_En_Ds/z_en_ds.c
  92. 7
      soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c
  93. 27
      soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c
  94. 175
      soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c
  95. 4
      soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.h
  96. 23
      soh/src/overlays/actors/ovl_En_Go/z_en_go.c
  97. 68
      soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
  98. 43
      soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c
  99. 10
      soh/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c
  100. 25
      soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c
  101. Some files were not shown because too many files have changed in this diff Show More

2
libultraship/libultraship/Hooks.h

@ -31,4 +31,6 @@ namespace Ship { @@ -31,4 +31,6 @@ namespace Ship {
DEFINE_HOOK(LoadTexture, void(const char* path, uint8_t** texture));
DEFINE_HOOK(GfxInit, void());
DEFINE_HOOK(ExitGame, void());
DEFINE_HOOK(LoadFile, void(uint32_t fileNum));
DEFINE_HOOK(DeleteFile, void(uint32_t fileNum));
}

3
libultraship/libultraship/ImGuiImpl.cpp

@ -327,6 +327,9 @@ namespace SohImGui { @@ -327,6 +327,9 @@ namespace SohImGui {
io->ConfigFlags |= ImGuiConfigFlags_DockingEnable;
io->Fonts->AddFontDefault();
statsWindowOpen = CVar_GetS32("gStatsEnabled", 0);
CVar_RegisterS32("gRandomizeRupeeNames", 1);
CVar_RegisterS32("gRandoRelevantNavi", 1);
CVar_RegisterS32("gRandoMatchKeyColors", 1);
#ifdef __SWITCH__
Ship::Switch::SetupFont(io->Fonts);
#endif

11
soh/CMakeLists.txt

@ -110,6 +110,9 @@ set(Header_Files__include @@ -110,6 +110,9 @@ set(Header_Files__include
"include/ichain.h"
"include/macro.inc"
"include/macros.h"
"include/message_data_fmt.h"
"include/message_data_static.h"
"include/message_data_textbox_types.h"
#"include/math_n64.h"
"include/regs.h"
"include/segment_symbols.h"
@ -178,7 +181,12 @@ source_group("Header Files\\soh\\Enhancements\\debugger" FILES ${Header_Files__s @@ -178,7 +181,12 @@ source_group("Header Files\\soh\\Enhancements\\debugger" FILES ${Header_Files__s
set(Header_Files__soh__Enhancements__randomizer
"soh/Enhancements/randomizer/randomizer.h"
"soh/Enhancements/randomizer/randomizer_inf.h"
"soh/Enhancements/randomizer/randomizer_item_tracker.h"
"soh/Enhancements/randomizer/adult_trade_shuffle.h"
"soh/Enhancements/randomizer/randomizer_check_objects.h"
"soh/Enhancements/randomizer/draw.h"
"soh/Enhancements/randomizer/rando_hash.h"
)
source_group("Header Files\\soh\\Enhancements\\randomizer" FILES ${Header_Files__soh__Enhancements__randomizer})
@ -287,6 +295,9 @@ source_group("Source Files\\soh\\Enhancements\\debugger" FILES ${Source_Files__s @@ -287,6 +295,9 @@ source_group("Source Files\\soh\\Enhancements\\debugger" FILES ${Source_Files__s
set(Source_Files__soh__Enhancements__randomizer
"soh/Enhancements/randomizer/randomizer.cpp"
"soh/Enhancements/randomizer/randomizer_item_tracker.cpp"
"soh/Enhancements/randomizer/adult_trade_shuffle.c"
"soh/Enhancements/randomizer/randomizer_check_objects.cpp"
"soh/Enhancements/randomizer/draw.cpp"
)
source_group("Source Files\\soh\\Enhancements\\randomizer" FILES ${Source_Files__soh__Enhancements__randomizer})

6
soh/include/functions.h

@ -11,6 +11,7 @@ extern "C" @@ -11,6 +11,7 @@ extern "C"
#include "../../libultraship/libultraship/luslog.h"
#include <soh/Enhancements/item-tables/ItemTableTypes.h>
#include <soh/Enhancements/randomizer/randomizer_inf.h>
#if defined(INCLUDE_GAME_PRINTF) && defined(_DEBUG)
#define osSyncPrintf(fmt, ...) lusprintf(__FILE__, __LINE__, 0, fmt, __VA_ARGS__)
@ -559,6 +560,8 @@ s32 Flags_GetEventChkInf(s32 flag); @@ -559,6 +560,8 @@ s32 Flags_GetEventChkInf(s32 flag);
void Flags_SetEventChkInf(s32 flag);
s32 Flags_GetInfTable(s32 flag);
void Flags_SetInfTable(s32 flag);
s32 Flags_GetRandomizerInf(RandomizerInf flag);
void Flags_SetRandomizerInf(RandomizerInf flag);
u16 func_80037C30(GlobalContext* globalCtx, s16 arg1);
s32 func_80037D98(GlobalContext* globalCtx, Actor* actor, s16 arg2, s32* arg3);
s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4);
@ -860,6 +863,7 @@ void Cutscene_HandleEntranceTriggers(GlobalContext* globalCtx); @@ -860,6 +863,7 @@ void Cutscene_HandleEntranceTriggers(GlobalContext* globalCtx);
void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx);
void Cutscene_SetSegment(GlobalContext* globalCtx, void* segment);
void GetItem_Draw(GlobalContext* globalCtx, s16 drawId);
void GetItemEntry_Draw(GlobalContext* globalCtx, GetItemEntry getItemEntry);
void SoundSource_InitAll(GlobalContext* globalCtx);
void SoundSource_UpdateAll(GlobalContext* globalCtx);
void SoundSource_PlaySfxAtFixedWorldPos(GlobalContext* globalCtx, Vec3f* pos, s32 duration, u16 sfxId);
@ -1061,9 +1065,11 @@ void PerformAutosave(GlobalContext* globalCtx, u8 item); @@ -1061,9 +1065,11 @@ void PerformAutosave(GlobalContext* globalCtx, u8 item);
void Inventory_DeleteItem(u16 item, u16 invSlot);
s32 Inventory_ReplaceItem(GlobalContext* globalCtx, u16 oldItem, u16 newItem);
s32 Inventory_HasEmptyBottle(void);
bool Inventory_HasEmptyBottleSlot(void);
s32 Inventory_HasSpecificBottle(u8 bottleItem);
void Inventory_UpdateBottleItem(GlobalContext* globalCtx, u8 item, u8 cButton);
s32 Inventory_ConsumeFairy(GlobalContext* globalCtx);
bool Inventory_HatchPocketCucco(GlobalContext* globalCtx);
void Interface_SetDoAction(GlobalContext* globalCtx, u16 action);
void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState);
void Interface_LoadActionLabelB(GlobalContext* globalCtx, u16 action);

3
soh/include/macros.h

@ -260,5 +260,8 @@ extern GraphicsContext* __gfxCtx; @@ -260,5 +260,8 @@ extern GraphicsContext* __gfxCtx;
#define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1)
#define NUM_TRIALS 6
#define NUM_SHOP_ITEMS 64
#define NUM_SCRUBS 35
#endif

22
soh/include/message_data_static.h

@ -3,32 +3,12 @@ @@ -3,32 +3,12 @@
#include "global.h"
#include "message_data_fmt.h"
#include "message_data_textbox_types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
/* 0 */ TEXTBOX_TYPE_BLACK,
/* 1 */ TEXTBOX_TYPE_WOODEN,
/* 2 */ TEXTBOX_TYPE_BLUE,
/* 3 */ TEXTBOX_TYPE_OCARINA,
/* 4 */ TEXTBOX_TYPE_NONE_BOTTOM,
/* 5 */ TEXTBOX_TYPE_NONE_NO_SHADOW,
/* 11 */ TEXTBOX_TYPE_CREDITS = 11
} TextBoxType;
typedef enum {
/* 0 */ TEXTBOX_BG_CROSS
} TextBoxBackground;
typedef enum {
/* 0 */ TEXTBOX_POS_VARIABLE,
/* 1 */ TEXTBOX_POS_TOP,
/* 2 */ TEXTBOX_POS_MIDDLE,
/* 3 */ TEXTBOX_POS_BOTTOM
} TextBoxPosition;
typedef struct {
u16 textId;
u8 typePos;

25
soh/include/message_data_textbox_types.h

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
#ifndef MESSAGE_DATA_TEXTBOX_TYPES_H
#define MESSAGE_DATA_TEXTBOX_TYPES_H
typedef enum {
/* 0 */ TEXTBOX_TYPE_BLACK,
/* 1 */ TEXTBOX_TYPE_WOODEN,
/* 2 */ TEXTBOX_TYPE_BLUE,
/* 3 */ TEXTBOX_TYPE_OCARINA,
/* 4 */ TEXTBOX_TYPE_NONE_BOTTOM,
/* 5 */ TEXTBOX_TYPE_NONE_NO_SHADOW,
/* 11 */ TEXTBOX_TYPE_CREDITS = 11
} TextBoxType;
typedef enum {
/* 0 */ TEXTBOX_BG_CROSS
} TextBoxBackground;
typedef enum {
/* 0 */ TEXTBOX_POS_VARIABLE,
/* 1 */ TEXTBOX_POS_TOP,
/* 2 */ TEXTBOX_POS_MIDDLE,
/* 3 */ TEXTBOX_POS_BOTTOM
} TextBoxPosition;
#endif

11
soh/include/z64player.h

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
struct Player;
extern GetItemEntry sGetItemTable[195];
typedef enum {
/* 0 */ PLAYER_SWORD_NONE,
/* 1 */ PLAYER_SWORD_KOKIRI,
@ -366,6 +368,7 @@ typedef enum { @@ -366,6 +368,7 @@ typedef enum {
FLAG_SCENE_CLEAR,
FLAG_SCENE_COLLECTIBLE,
FLAG_EVENT_CHECK_INF,
FLAG_RANDOMIZER_INF
} FlagType;
typedef struct {
@ -627,9 +630,9 @@ typedef struct Player { @@ -627,9 +630,9 @@ typedef struct Player {
/* 0x0A86 */ s8 unk_A86;
/* 0x0A87 */ u8 unk_A87;
/* 0x0A88 */ Vec3f unk_A88; // previous body part 0 position
/* 0x0A94 */ PendingFlag pendingFlag;
/* 0x0AA0 */ u8 boomerangQuickRecall; // Has the player pressed the boomerang button while it's in the air still?
/* 0x0AA1 */ GetItemEntry getItemEntry;
} Player; // size = 0xAA9
/* 0x0A95 */ PendingFlag pendingFlag;
/* 0x0AA1 */ u8 boomerangQuickRecall; // Has the player pressed the boomerang button while it's in the air still?
/* 0x0AA2 */ GetItemEntry getItemEntry;
} Player; // size = 0xAAA
#endif

8
soh/include/z64save.h

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
#include "z64math.h"
#include "z64audio.h"
#include "soh/Enhancements/randomizer/randomizerTypes.h"
#include "soh/Enhancements/randomizer/randomizer_inf.h"
typedef struct {
/* 0x00 */ u8 buttonItems[8];
@ -175,16 +176,17 @@ typedef struct { @@ -175,16 +176,17 @@ typedef struct {
/* 0x1422 */ s16 sunsSongState; // controls the effects of suns song
/* 0x1424 */ s16 healthAccumulator;
RandoSetting randoSettings[300];
ItemLocationRando itemLocations[500];
ItemLocationRando itemLocations[RC_MAX];
HintLocationRando hintLocations[50];
char childAltarText[250];
char adultAltarText[750];
char ganonHintText[150];
char ganonText[250];
u8 seedIcons[5];
u8 dungeonsDone[8];
u8 trialsDone[6];
u16 randomizerInf[8];
u8 temporaryWeapon;
u16 adultTradeItems;
u8 pendingIceTrapCount;
} SaveContext; // size = 0x1428
typedef enum {

26
soh/soh/Enhancements/custom-message/CustomMessageManager.h

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
#include <string>
#include <unordered_map>
#include "../../../include/z64item.h"
#include "../../../include/message_data_textbox_types.h"
#undef MESSAGE_END
@ -14,31 +15,6 @@ @@ -14,31 +15,6 @@
#define QM_YELLOW 0x46
#define QM_BLACK 0x47
#ifndef MESSAGE_DATA_STATIC_H
typedef enum {
/* 0 */ TEXTBOX_TYPE_BLACK,
/* 1 */ TEXTBOX_TYPE_WOODEN,
/* 2 */ TEXTBOX_TYPE_BLUE,
/* 3 */ TEXTBOX_TYPE_OCARINA,
/* 4 */ TEXTBOX_TYPE_NONE_BOTTOM,
/* 5 */ TEXTBOX_TYPE_NONE_NO_SHADOW,
/* 11 */ TEXTBOX_TYPE_CREDITS = 11
} TextBoxType;
typedef enum {
/* 0 */ TEXTBOX_BG_CROSS
} TextBoxBackground;
typedef enum {
/* 0 */ TEXTBOX_POS_VARIABLE,
/* 1 */ TEXTBOX_POS_TOP,
/* 2 */ TEXTBOX_POS_MIDDLE,
/* 3 */ TEXTBOX_POS_BOTTOM
} TextBoxPosition;
#endif
typedef struct {
TextBoxType textBoxType;
TextBoxPosition textBoxPos;

14
soh/soh/Enhancements/custom-message/CustomMessageTypes.h

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
#pragma once
typedef enum {
TEXT_BUY_BOMBCHU_10_PROMPT = 0x8C,
TEXT_BUY_BOMBCHU_10_DESC = 0xBC,
TEXT_GS_NO_FREEZE = 0xB4,
TEXT_GS_FREEZE = 0xB5,
TEXT_RANDOMIZER_CUSTOM_ITEM = 0xF8,
@ -11,7 +13,14 @@ typedef enum { @@ -11,7 +13,14 @@ typedef enum {
TEXT_ALTAR_CHILD = 0x7040,
TEXT_ALTAR_ADULT = 0x7088,
TEXT_GANONDORF = 0x70CC,
TEXT_GANONDORF_NOHINT = 0x70CD
TEXT_GANONDORF_NOHINT = 0x70CD,
TEXT_BLUE_RUPEE = 0xCC,
TEXT_RED_RUPEE = 0xF0,
TEXT_PURPLE_RUPEE = 0xF1,
TEXT_HUGE_RUPEE = 0xF2,
TEXT_BEAN_SALESMAN = 0x405E,
TEXT_SCRUB_RANDOM = 0x9000,
TEXT_SHOP_ITEM_RANDOM = 0x9100,
} TextIDs;
#ifdef __cplusplus
@ -30,4 +39,7 @@ typedef struct { @@ -30,4 +39,7 @@ typedef struct {
#define GIMESSAGE_UNTRANSLATED(giid, iid, message) \
{ giid, iid, message, message, message }
#define GIMESSAGE_NO_GERMAN(giid, iid, english, french) \
{ giid, iid, english, english, french }
#endif

229
soh/soh/Enhancements/debugger/debugSaveEditor.cpp

@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
#include "debugSaveEditor.h"
#include "../../util.h"
#include "../../OTRGlobals.h"
#include <libultraship/ImGuiImpl.h>
#include "../../UIWidgets.hpp"
#include <spdlog/fmt/fmt.h>
#include <array>
#include <bit>
#include <map>
@ -14,6 +16,7 @@ extern "C" { @@ -14,6 +16,7 @@ extern "C" {
#include "variables.h"
#include "functions.h"
#include "macros.h"
#include "soh/Enhancements/randomizer/adult_trade_shuffle.h"
extern GlobalContext* gGlobalCtx;
#include "textures/icon_item_static/icon_item_static.h"
@ -525,6 +528,27 @@ void DrawInfoTab() { @@ -525,6 +528,27 @@ void DrawInfoTab() {
ImGui::PopItemWidth();
}
void DrawBGSItemFlag(uint8_t itemID) {
const ItemMapEntry& slotEntry = itemMapping[itemID];
ImGui::Image(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1));
ImGui::SameLine();
int tradeIndex = itemID - ITEM_POCKET_EGG;
bool hasItem = (gSaveContext.adultTradeItems & (1 << tradeIndex)) != 0;
bool shouldHaveItem = hasItem;
ImGui::Checkbox(("##adultTradeFlag" + std::to_string(itemID)).c_str(), &shouldHaveItem);
if (hasItem != shouldHaveItem) {
if (shouldHaveItem) {
gSaveContext.adultTradeItems |= (1 << tradeIndex);
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_NONE) {
INV_CONTENT(ITEM_TRADE_ADULT) = ITEM_POCKET_EGG + tradeIndex;
}
} else {
gSaveContext.adultTradeItems &= ~(1 << tradeIndex);
Inventory_ReplaceItem(gGlobalCtx, itemID, Randomizer_GetNextAdultTradeItem());
}
}
}
void DrawInventoryTab() {
static bool restrictToValid = true;
@ -566,6 +590,9 @@ void DrawInventoryTab() { @@ -566,6 +590,9 @@ void DrawInventoryTab() {
if (ImGui::BeginPopup(itemPopupPicker)) {
if (ImGui::Button("##itemNonePicker", ImVec2(32.0f, 32.0f))) {
gSaveContext.inventory.items[selectedIndex] = ITEM_NONE;
if (selectedIndex == SLOT_TRADE_ADULT) {
gSaveContext.adultTradeItems = 0;
}
ImGui::CloseCurrentPopup();
}
UIWidgets::SetLastItemHoverText("None");
@ -596,6 +623,13 @@ void DrawInventoryTab() { @@ -596,6 +623,13 @@ void DrawInventoryTab() {
if (ImGui::ImageButton(SohImGui::GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f),
ImVec2(0, 0), ImVec2(1, 1), 0)) {
gSaveContext.inventory.items[selectedIndex] = slotEntry.id;
// Set adult trade item flag if you're playing adult trade shuffle in rando
if (gSaveContext.n64ddFlag &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE) &&
selectedIndex == SLOT_TRADE_ADULT &&
slotEntry.id >= ITEM_POCKET_EGG && slotEntry.id <= ITEM_CLAIM_CHECK) {
gSaveContext.adultTradeItems |= ADULT_TRADE_FLAG(slotEntry.id);
}
ImGui::CloseCurrentPopup();
}
UIWidgets::SetLastItemHoverText(SohUtils::GetItemName(slotEntry.id));
@ -632,6 +666,16 @@ void DrawInventoryTab() { @@ -632,6 +666,16 @@ void DrawInventoryTab() {
ImGui::PopID();
}
}
// Trade quest flags are only used when shuffling the trade sequence, so
// don't show this if it isn't needed.
if (gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE)
&& ImGui::TreeNode("Adult trade quest items")) {
for (int i = ITEM_POCKET_EGG; i <= ITEM_CLAIM_CHECK; i++) {
DrawBGSItemFlag(i);
}
ImGui::TreePop();
}
}
// Draw a flag bitfield as an grid of checkboxes
@ -656,12 +700,14 @@ void DrawFlagArray32(const std::string& name, uint32_t& flags) { @@ -656,12 +700,14 @@ void DrawFlagArray32(const std::string& name, uint32_t& flags) {
ImGui::PopID();
}
void DrawFlagArray16(const std::string& name, uint16_t& flags) {
ImGui::PushID(name.c_str());
void DrawFlagArray16(const FlagTable& flagTable, uint16_t row, uint16_t& flags) {
ImGui::PushID((std::to_string(row) + flagTable.name).c_str());
for (int32_t flagIndex = 15; flagIndex >= 0; flagIndex--) {
ImGui::SameLine();
ImGui::PushID(flagIndex);
bool hasDescription = !!flagTable.flagDescriptions.contains(row * 16 + flagIndex);
uint32_t bitMask = 1 << flagIndex;
ImGui::PushStyleColor(ImGuiCol_FrameBg, hasDescription ? ImVec4(0.16f, 0.29f, 0.48f, 0.54f) : ImVec4(0.16f, 0.29f, 0.48f, 0.24f));
bool flag = (flags & bitMask) != 0;
if (ImGui::Checkbox("##check", &flag)) {
if (flag) {
@ -670,6 +716,12 @@ void DrawFlagArray16(const std::string& name, uint16_t& flags) { @@ -670,6 +716,12 @@ void DrawFlagArray16(const std::string& name, uint16_t& flags) {
flags &= ~bitMask;
}
}
ImGui::PopStyleColor();
if (ImGui::IsItemHovered() && hasDescription) {
ImGui::BeginTooltip();
ImGui::Text("%s", UIWidgets::WrappedText(flagTable.flagDescriptions.at(row * 16 + flagIndex), 60));
ImGui::EndTooltip();
}
ImGui::PopID();
}
ImGui::PopID();
@ -868,134 +920,53 @@ void DrawFlagsTab() { @@ -868,134 +920,53 @@ void DrawFlagsTab() {
setMask <<= 1;
}
static bool keepGsCountUpdated = true;
ImGui::Checkbox("Keep GS Count Updated", &keepGsCountUpdated);
UIWidgets::InsertHelpHoverText("Automatically adjust the number of gold skulltula tokens acquired based on set flags");
int32_t gsCount = 0;
if (keepGsCountUpdated) {
for (int32_t gsFlagIndex = 0; gsFlagIndex < 6; gsFlagIndex++) {
gsCount += std::popcount(static_cast<uint32_t>(gSaveContext.gsFlags[gsFlagIndex]));
// If playing a Randomizer Save with Shuffle Skull Tokens on anything other than "Off" we don't want to keep
// GS Token Count updated, since Gold Skulltulas killed will not correlate to GS Tokens Collected.
if (!(gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_TOKENS))) {
static bool keepGsCountUpdated = true;
ImGui::Checkbox("Keep GS Count Updated", &keepGsCountUpdated);
UIWidgets::InsertHelpHoverText("Automatically adjust the number of gold skulltula tokens acquired based on set flags.");
int32_t gsCount = 0;
if (keepGsCountUpdated) {
for (int32_t gsFlagIndex = 0; gsFlagIndex < 6; gsFlagIndex++) {
gsCount += std::popcount(static_cast<uint32_t>(gSaveContext.gsFlags[gsFlagIndex]));
}
gSaveContext.inventory.gsTokens = gsCount;
}
gSaveContext.inventory.gsTokens = gsCount;
}
});
if (ImGui::TreeNode("Event Check Inf Flags")) {
DrawGroupWithBorder([&]() {
ImGui::Text("0");
UIWidgets::InsertHelpHoverText("Mostly Kokiri Forest related");
DrawFlagArray16("eci0", gSaveContext.eventChkInf[0]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("1");
UIWidgets::InsertHelpHoverText("Mostly Lon Lon Ranch related");
DrawFlagArray16("eci1", gSaveContext.eventChkInf[1]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("2");
UIWidgets::InsertHelpHoverText("Dodongo Related?");
DrawFlagArray16("eci2", gSaveContext.eventChkInf[2]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("3");
UIWidgets::InsertHelpHoverText("Mostly Zora related");
DrawFlagArray16("eci3", gSaveContext.eventChkInf[3]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("4");
UIWidgets::InsertHelpHoverText("Random");
DrawFlagArray16("eci4", gSaveContext.eventChkInf[4]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("5");
UIWidgets::InsertHelpHoverText("Mostly song learning related");
DrawFlagArray16("eci5", gSaveContext.eventChkInf[5]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("6");
UIWidgets::InsertHelpHoverText("Random");
DrawFlagArray16("eci6", gSaveContext.eventChkInf[6]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("7");
UIWidgets::InsertHelpHoverText("Boss Battle related");
DrawFlagArray16("eci7", gSaveContext.eventChkInf[7]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("8");
UIWidgets::InsertHelpHoverText("Mask related?");
DrawFlagArray16("eci8", gSaveContext.eventChkInf[8]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("9");
UIWidgets::InsertHelpHoverText("Mostly carpenter related");
DrawFlagArray16("eci9", gSaveContext.eventChkInf[9]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("A");
UIWidgets::InsertHelpHoverText("First-time overworld entrance cs related");
DrawFlagArray16("eci10", gSaveContext.eventChkInf[10]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("B");
UIWidgets::InsertHelpHoverText("First-time dungeon entrance cs/trial cs related");
DrawFlagArray16("eci11", gSaveContext.eventChkInf[11]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("C");
UIWidgets::InsertHelpHoverText("Random");
DrawFlagArray16("eci12", gSaveContext.eventChkInf[12]);
});
DrawGroupWithBorder([&]() {
ImGui::Text("D");
UIWidgets::InsertHelpHoverText("Frog songs/GS rewards");
DrawFlagArray16("eci13", gSaveContext.eventChkInf[13]);
});
ImGui::TreePop();
}
if (ImGui::TreeNode("Inf Table Flags")) {
for (int i = 0; i < 30; i++) {
std::string it_id = "it" + std::to_string(i);
DrawGroupWithBorder([&]() {
ImGui::Text("%2d", i);
DrawFlagArray16(it_id, gSaveContext.infTable[i]);
});
}
ImGui::TreePop();
}
if (ImGui::TreeNode("Item Get Inf Flags")) {
for (int i = 0; i < 4; i++) {
std::string igi_id = "igi" + std::to_string(i);
DrawGroupWithBorder([&]() {
ImGui::Text("%d", i);
DrawFlagArray16(igi_id, gSaveContext.itemGetInf[i]);
});
for (int i = 0; i < flagTables.size(); i++) {
const FlagTable& flagTable = flagTables[i];
if (flagTable.flagTableType == RANDOMIZER_INF && !gSaveContext.n64ddFlag) {
continue;
}
ImGui::TreePop();
}
if (ImGui::TreeNode("Event Inf Flags")) {
for (int i = 0; i < 4; i++) {
std::string ei_id = "ei" + std::to_string(i);
DrawGroupWithBorder([&]() {
ImGui::Text("%d", i);
DrawFlagArray16(ei_id, gSaveContext.eventInf[i]);
});
if (ImGui::TreeNode(flagTable.name)) {
for (int j = 0; j < flagTable.size + 1; j++) {
DrawGroupWithBorder([&]() {
ImGui::Text(fmt::format("{:<2x}", j).c_str());
switch (flagTable.flagTableType) {
case EVENT_CHECK_INF:
DrawFlagArray16(flagTable, j, gSaveContext.eventChkInf[j]);
break;
case ITEM_GET_INF:
DrawFlagArray16(flagTable, j, gSaveContext.itemGetInf[j]);
break;
case INF_TABLE:
DrawFlagArray16(flagTable, j, gSaveContext.infTable[j]);
break;
case EVENT_INF:
DrawFlagArray16(flagTable, j, gSaveContext.eventInf[j]);
break;
case RANDOMIZER_INF:
DrawFlagArray16(flagTable, j, gSaveContext.randomizerInf[j]);
break;
}
});
}
ImGui::TreePop();
}
ImGui::TreePop();
}
}
@ -1154,11 +1125,19 @@ void DrawEquipmentTab() { @@ -1154,11 +1125,19 @@ void DrawEquipmentTab() {
DrawUpgradeIcon("Strength", UPG_STRENGTH, strengthValues);
// There is no icon for child wallet, so default to a text list
const std::vector<std::string> walletNames = {
// this was const, but I needed to append to it depending in rando settings.
std::vector<std::string> walletNamesImpl = {
"Child (99)",
"Adult (200)",
"Giant (500)",
};
// only display Tycoon wallet if you're in a save file that would allow it.
if (gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) > 1) {
const std::string walletName = "Tycoon (999)";
walletNamesImpl.push_back(walletName);
}
// copy it to const value for display in ImGui.
const std::vector<std::string> walletNames = walletNamesImpl;
DrawUpgrade("Wallet", UPG_WALLET, walletNames);
const std::vector<std::string> stickNames = {

412
soh/soh/Enhancements/debugger/debugSaveEditor.h

@ -1,3 +1,415 @@ @@ -1,3 +1,415 @@
#pragma once
#include <array>
#include <map>
#include <string>
#include <vector>
#include <soh/Enhancements/randomizer/randomizer_inf.h>
void InitSaveEditor();
typedef enum {
EVENT_CHECK_INF,
ITEM_GET_INF,
INF_TABLE,
EVENT_INF,
RANDOMIZER_INF,
} FlagTableType;
typedef struct {
const char* name;
FlagTableType flagTableType;
uint32_t size;
std::map<uint16_t, const char*> flagDescriptions;
} FlagTable;
// Reference https://tcrf.net/Proto:The_Legend_of_Zelda:_Ocarina_of_Time_Master_Quest/Event_Editor
// The source was last referenced on 2022-09-03 and had a last updated value of 2020-05-02
const std::vector<FlagTable> flagTables = {
{ "Event Check Inf Flags", EVENT_CHECK_INF, 0x0D, {
{ 0x02, "First Spoke to Mido" },
{ 0x03, "Complained About Mido to Saria" },
{ 0x04, "Showed Mido Sword & Shield" },
{ 0x05, "Deku Tree Opened Mouth" },
{ 0x06, "Spoke to Saria After Deku Tree's Death" },
{ 0x07, "Obtained Kokiri Emerald & Deku Tree Dead" },
{ 0x09, "Used Deku Tree Blue Warp" },
{ 0x0A, "Played Saria's Song for Mido as Adult" },
{ 0x0C, "Met Deku Tree" },
{ 0x10, "Spoke to Child Malon at Castle or Market" },
{ 0x11, "Spoke to Ingo at Ranch before Talon returns" },
{ 0x12, "Obtained Pocket Egg" },
{ 0x13, "Woke Talon" },
{ 0x14, "Talon Fled Hyrule Castle" },
{ 0x15, "Spoke to Child Malon at Ranch" },
{ 0x16, "Invited to Sing With Child Malon" },
{ 0x17, "Great Deku Tree is Dead" },
{ 0x18, "Obtained Epona" },
{ 0x19, "Obtained Kokiri's Emerald" },
{ 0x1B, "Rented Horse From Ingo" },
{ 0x1C, "Spoke to Mido After Deku Tree's Death" },
{ 0x1D, "Destroyed the Royal Family's Tomb" },
{ 0x1E, "Won the Cow in Malon's Race" },
{ 0x23, "Bombed Dodongo's Cavern Entrance" },
{ 0x25, "Used Dodongo's Cavern Blue Warp" },
{ 0x2F, "Death Mountain Erupted" },
{ 0x30, "Spoke to a Zora" },
{ 0x31, "Obtained Ruto's Letter" },
{ 0x33, "King Zora Moved Aside" },
{ 0x37, "Used Jabu-Jabu Blue Warp" },
{ 0x38, "Obtained Silver Scale" },
{ 0x39, "Opened Entrance to Zora's Domain" },
{ 0x3A, "Offered Fish to Jabu-Jabu" },
{ 0x3B, "Began Nabooru Battle" },
{ 0x3C, "Finished Nabooru Battle" },
{ 0x40, "Obtained Zelda's Letter" },
{ 0x43, "Obtained Ocarina of Time" },
{ 0x45, "Pulled Master Sword from Pedestal" },
{ 0x48, "Used Forest Temple Blue Warp" },
{ 0x49, "Used Fire Temple Blue Warp" },
{ 0x4A, "Used Water Temple Blue Warp" },
{ 0x4B, "Opened the Door of Time" },
{ 0x4D, "Rainbow Bridge Built by Sages" },
{ 0x4E, "Caught by Hyrule Castle Guards" },
{ 0x4F, "Entered the Master Sword Chamber" },
{ 0x50, "Learned Minuet of Forest" },
{ 0x51, "Learned Bolero of Fire" },
{ 0x52, "Learned Serenade of Water" },
{ 0x54, "Learned Nocturne of Shadow" },
{ 0x55, "Sheik Moved From Sword Pedestal" },
{ 0x57, "Learned Saria's Song" },
{ 0x59, "Learned Zelda's Lullaby" },
{ 0x5A, "Learned Sun's Song" },
{ 0x5B, "Learned Song of Storms" },
{ 0x65, "Played Song of Storms in Windmill" },
{ 0x67, "Drained Well in Kakariko Village" },
{ 0x68, "Played Gerudo Archery Minigame" },
{ 0x69, "Restored Lake Hylia's Water" },
{ 0x6A, "Woke Talon in Kakariko" },
{ 0x6B, "Spoke to Talon After Saving Ranch" },
{ 0x6F, "Spoke to Kaepora Gaebora by Lost Woods" },
{ 0x70, "Began Gohma Battle" },
{ 0x71, "Began King Dodongo Battle" },
{ 0x72, "Began Phantom Ganon Battle" },
{ 0x73, "Began Volvagia Battle" },
{ 0x74, "Began Morpha Battle" },
{ 0x75, "Began Twinrova Battle" },
{ 0x76, "Began Barinade Battle" },
{ 0x77, "Began Bongo Bongo Battle" },
{ 0x78, "Began Ganondorf Battle" },
{ 0x80, "Zelda Fled Hyrule Castle" },
{ 0x82, "Bridge Unlocked (After Zelda Escape Cutscene)" },
{ 0x8C, "Paid Back Keaton Mask Fee" },
{ 0x8D, "Paid Back Skull Mask Fee" },
{ 0x8E, "Paid Back Spooky Mask Fee" },
{ 0x8F, "Paid Back Bunny Hood Fee" },
{ 0x90, "Rescued Red Carpenter" },
{ 0x91, "Rescued Yellow Carpenter" },
{ 0x92, "Rescued Blue Carpenter" },
{ 0x93, "Rescued Green Carpenter" },
{ 0x94, "Spoke to Nabooru in Spirit Temple" },
{ 0x95, "Nabooru Captured by Twinrova" },
{ 0x96, "Spoke to Cursed Man in Skulltula House" },
{ 0x9C, "Played Song for Scarecrow as Adult" },
{ 0xA0, "Entered Hyrule Field" },
{ 0xA1, "Entered Death Mountain Trail" },
{ 0xA3, "Entered Kakariko Village" },
{ 0xA4, "Entered Zora's Domain" },
{ 0xA5, "Entered Hyrule Castle" },
{ 0xA6, "Entered Goron City" },
{ 0xA7, "Entered Temple of Time" },
{ 0xA8, "Entered Deku Tree" },
{ 0xA9, "Learned Song of Time" },
{ 0xAA, "Bongo Bongo Escaped Well" },
{ 0xAC, "Learned Requiem of Spirit" },
{ 0xAD, "Completed Spirit Trial" },
{ 0xB0, "Entered Dodongo's Cavern" },
{ 0xB1, "Entered Lake Hylia" },
{ 0xB2, "Entered Gerudo Valley" },
{ 0xB3, "Entered Gerudo's Fortress" },
{ 0xB4, "Entered Lon Lon Ranch" },
{ 0xB5, "Entered Jabu-Jabu's Belly" },
{ 0xB6, "Entered Graveyard" },
{ 0xB7, "Entered Zora's Fountain" },
{ 0xB8, "Entered Desert Colossus" },
{ 0xB9, "Entered Death Mountain Crater" },
{ 0xBA, "Entered Ganon's Castle (Exterior)" },
{ 0xBB, "Completed Forest Trial" },
{ 0xBC, "Completed Water Trial" },
{ 0xBD, "Completed Shadow Trial" },
{ 0xBE, "Completed Fire Trial" },
{ 0xBF, "Completed Light Trial" },
{ 0xC0, "Nabooru Ordered to Fight by Twinrova" },
{ 0xC1, "Spoke to Saria on Lost Woods Bridge" },
{ 0xC3, "Dispelled Ganon's Tower Barrier" },
{ 0xC4, "Returned to Temple of Time With All Medallions" },
{ 0xC5, "Sheik, Spawned at Master Sword Pedestal as Adult" },
{ 0xC6, "Spoke to Deku Tree Sprout" },
{ 0xC7, "Watched Ganon's Tower Collapse / Caught by Gerudo" },
{ 0xC8, "Obtained Spirit Medallion" },
{ 0xC9, "Demo_Effect, Temple of Time Warp in blue aura + sfx the first time you spawn as Adult" },
{ 0xD0, "Obtained Frogs' Piece of Heart" },
{ 0xD1, "Played Zelda's Lullaby for Frogs" },
{ 0xD2, "Played Epona's Song for Frogs" },
{ 0xD3, "Played Sun's Song for Frogs" },
{ 0xD4, "Played Saria's Song for Frogs" },
{ 0xD5, "Played Song of Time for Frogs" },
{ 0xD6, "Played Song of Storms for Frogs" },
{ 0xDA, "Obtained Adult's Wallet" },
{ 0xDB, "Obtained Stone of Agony" },
{ 0xDC, "Obtained Giant's Wallet" },
{ 0xDD, "Obtained Skulltula House's Bombchu" },
{ 0xDE, "Obtained Skulltula House's Piece of Heart" },
} },
{ "Item Get Inf Flags", ITEM_GET_INF, 0x03, {
{ 0x02, "Obtained Super Cucco Bottle" },
{ 0x03, "Bought Bombchu (Shelf 2: Top Right)" },
{ 0x04, "Bought Bombchu (Shelf 1: Bot. Right)" },
{ 0x05, "Bought Bombchu (Shelf 1: Top Left)" },
{ 0x06, "Bought Bombchu (Shelf 2: Bot. Left)" },
{ 0x07, "Bought Bombchu (Shelf 2: Bot. Right)" },
{ 0x08, "Bought Bombchu (Shelf 1: Top Right)" },
{ 0x09, "Bought Bombchu (Shelf 1: Bot. Left)" },
{ 0x0A, "Bought Bombchu (Shelf 2: Top Left)" },
{ 0x0B, "Obtained Scrub's Heart Piece" },
{ 0x0C, "Obtained Cucco Lady's Bottle" },
{ 0x0D, "Obtained Bullet Bag Upgrade (Market)" },
{ 0x0E, "Obtained Big Quiver" },
{ 0x0F, "Obtained Biggest Quiver" },
{ 0x10, "Obtained Scientist's Heart Piece" },
{ 0x11, "Obtained Bowling Bomb Bag Upgrade" },
{ 0x12, "Obtained Bowling Heart Piece" },
{ 0x13, "Obtained Deku Seeds" },
{ 0x15, "Obtained Roof Guy's Heart Piece" },
{ 0x16, "Obtained Skullkid's Heart Piece" },
{ 0x17, "Obtained Skullkids' Heart Piece" },
{ 0x18, "Obtained Farore's Wind" },
{ 0x19, "Obtained Din's Fire" },
{ 0x1A, "Obtained Nayru's Love" },
{ 0x1C, "Obtained Grave-Dig Heart Piece" },
{ 0x1D, "Obtained Bullet Bag Upgrade (Woods)" },
{ 0x1E, "Obtained Deku Stick Upgrade (Stage)" },
{ 0x1F, "Obtained Deku Nut Upgrade (Stage)" },
{ 0x23, "Obtained Keaton Mask" },
{ 0x24, "Obtained Skull Mask" },
{ 0x25, "Obtained Spooky Mask" },
{ 0x26, "Obtained Bunny Hood" },
{ 0x2A, "Obtained Mask of Truth" },
{ 0x2C, "Obtained Pocket Egg" },
{ 0x2E, "Obtained Cojiro" },
{ 0x30, "Obtained Odd Potion" },
{ 0x31, "Obtained Poacher's Saw" },
{ 0x38, "Sold Keaton Mask" },
{ 0x39, "Sold Skull Mask" },
{ 0x3A, "Sold Spooky Mask" },
{ 0x3B, "Sold Bunny Hood" },
{ 0x3F, "Obtained Mask of Truth" },
} },
{ "Inf Flags", INF_TABLE, 0x1D, {
{ 0x00, "Greeted by Saria" },
{ 0x01, "Spoke to Saria About Obtaining Fairy" },
{ 0x03, "Complained About Mido to Saria" },
{ 0x05, "Spoke to Saria in Saria's House" },
{ 0x0C, "Mido Asked to See Sword & Shield" },
{ 0x15, "Spoke to Mido in Lost Woods as Adult" },
{ 0x19, "Told Mido Saria Won't Return" },
{ 0x1E, "Spoke to Kokiri Girl by Jumping Stones" },
{ 0x22, "Spoke to Kokiri Boy Guarding Forest Exit" },
{ 0x24, "Spoke to Kokiri Boy Cutting Grass" },
{ 0x26, "Spoke to Kokiri Girl on Shop Awning" },
{ 0x28, "Spoke to Kokiri Girl About Training Center" },
{ 0x31, "Spoke to Kokiri Boy on Bed in Mido's House" },
{ 0x51, "Spoke to Kokiri Girl in Saria's House" },
{ 0x59, "Spoke to Know-It-All Bro. About Temple" },
{ 0x61, "Spoke to Know-It-All Bro. About Saria" },
{ 0x66, "Spoke to Deku Tree Sprout After Cutscene" },
{ 0x6C, "Spoke to Dying Knight" },
{ 0x76, "Showed Zelda's Letter to Gate Guard" },
{ 0x77, "Gate Guard Put On Keaton Mask" },
{ 0x7E, "Spoke to Talon in Lon Lon Ranch House" },
{ 0x84, "Spoke to Child Malon at Castle or Market" },
{ 0x85, "Child Malon Said Epona Was Afraid of You" },
{ 0x8B, "Entered Hyrule Castle" },
{ 0x94, "Spoke to Ingo at Ranch Before Talon's Return" },
{ 0x97, "Spoke to Ingo at Ranch" },
{ 0x9A, "Spoke to Ingo as Adult" },
{ 0xA2, "Refused Ingo's 50 Rupee Rental Request" },
{ 0xAB, "Rode a Horse at Ingo's Ranch" },
{ 0xB0, "Spoke to Medigoron as Child" },
{ 0xB1, "Spoke to Medigoron as Adult" },
{ 0xB6, "Spoke to Poe Collector in Ruined Market" },
{ 0xB7, "Spoke to Fado in Kokiri Forest as Child" },
{ 0xB8, "Spoke to Malon After Saving Ranch" },
{ 0xB9, "Spoke to Malon on Horseback" },
{ 0xBC, "Spoke to Carpenter Boss by Tent" },
{ 0xC0, "Spoke to Fat Woman by Market Potion Shop" },
{ 0xC1, "Spoke to Fat Woman After Zelda's Escape" },
{ 0xC2, "Spoke to Burly Man About Talon Search" },
{ 0xC3, "Spoke to Burly Man After Zelda's Escape" },
{ 0xC4, "Spoke to Thief After Zelda's Escape" },
{ 0xC5, "Spoke to Thin Man by Market Target Shop" },
{ 0xC6, "Spoke to Old Woman by Market Fountain" },
{ 0xC7, "Spoke to Old Man by Bombchu Bowling" },
{ 0xC8, "Spoke to Thin Lady by Bombchu Bowling" },
{ 0xC9, "Spoke to Thin Lady After Zelda's Escape (1.0)" },
{ 0xCA, "Spoke to Red Joker in Market" },
{ 0xCB, "Spoke to Blue Joker in Market (1.0) / Dog Lady as Adult (DBG)" },
{ 0xCC, "Spoke to Itchy Lady After Malon Left Town" },
{ 0xCD, "Spoke to Blue Jokester in Market (DBG)" },
{ 0xCE, "Spoke to Thin Lady After Zelda's Escape (DBG)" },
{ 0xD9, "Spoke to Dampé as Child" },
{ 0xE0, "Spoke to Goron by Cavern" },
{ 0xE3, "Spoke to Goron Hiding Stick" },
{ 0xE6, "Spoke to Goron by Woods Exit" },
{ 0xEB, "Spoke to Goron by Bomb Flowers" },
{ 0xF0, "Spoke to Goron at City? Entrance" },
{ 0xF4, "Spoke to Ruby-Crazed Goron" },
{ 0xFC, "Spoke to Goron Shop Owner" },
{ 0x109, "Goron City Doors Unlocked" },
{ 0x10B, "Spoke to Goron Link About Volvagia" },
{ 0x10C, "Stopped Goron Link's Rolling" },
{ 0x10E, "Spoke to Goron Link" },
{ 0x113, "Spoke to Darunia in Goron City" },
{ 0x11A, "Spoke to Darunia in Fire Temple" },
{ 0x11E, "Obtained Bomb Bag Upgrade (Goron City)" },
{ 0x124, "Spoke to Zora Near Zora Shop?" },
{ 0x128, "Spoke to Zora Beside Zora Shop?" },
{ 0x129, "Spoke to Zora Swimming Behind Zora Shop" },
{ 0x138, "Thawed King Zora" },
{ 0x139, "Obtained Zora Tunic" },
{ 0x140, "Ruto in JJ (M7) on Blue Switch" },
{ 0x141, "Ruto in JJ (M2) Meet Ruto" },
{ 0x142, "Ruto in JJ (M3) Talk First Time" },
{ 0x143, "Ruto in JJ (M10) Can Be Escorted" },
{ 0x144, "Ruto in JJ (?) Wants to be Tossed to Sapphire" },
{ 0x145, "Ruto in JJ (M6) on Sapphire platform" },
{ 0x146, "Ruto in JJ (M6) Kidnapped" },
{ 0x147, "Ruto in JJ, Spawns on F1 Instead of B1" },
{ 0x160, "Spoke to Man in Impa's House During Day" },
{ 0x161, "Spoke to Man in Impa's House at Night" },
{ 0x162, "Spoke to Man in Impa's House as Adult" },
{ 0x163, "Spoke to Carpenter Boss's Wife as Child" },
{ 0x164, "Spoke to Carpenter Boss's Wife as Adult" },
{ 0x16C, "Refused Nabooru's Request" },
{ 0x170, "Spoke to Carpenter Boss in Valley" },
{ 0x172, "Spoke to Carpenter Boss in Kakariko" },
{ 0x176, "Spoke to Blue Carpenter in Tent" },
{ 0x178, "Spoke to Green Carpenter in Tent" },
{ 0x17F, "Running Man Suggested a Race" },
{ 0x190, "Obtained Gerudo Archery Piece of Heart" },
{ 0x191, "Obtained Dog Lady's Piece of Heart" },
{ 0x192, "Obtained Deku Stick Upgrade (Lost Woods)" },
{ 0x193, "Obtained Deku Nut Upgrade (Grotto)" },
{ 0x195, "Spoke to Kaepora in Lake Hylia" },
{ 0x196, "Spoke to Cursed Man With <10 Tokens" },
{ 0x197, "Spoke to Cursed Man With 10 Tokens" },
{ 0x198, "Obtained Small Magic Jar" },
{ 0x199, "Caught Cucco by Field Entrance" },
{ 0x19A, "Caught Cucco by Bazaar" },
{ 0x19B, "Caught Cucco by Cucco Pen" },
{ 0x19C, "Caught Cucco Behind Windmill" },
{ 0x19D, "Caught Cucco in Crate" },
{ 0x19E, "Caught Cucco by Skulltula House" },
{ 0x19F, "Caught Cucco Behind Potion Shop" },
{ 0x1A0, "Entered Deku Tree" },
{ 0x1A1, "Entered Dodongo's Cavern" },
{ 0x1A2, "Entered Jabu-Jabu's Belly" },
{ 0x1A3, "Entered Forest Temple" },
{ 0x1A4, "Entered Fire Temple" },
{ 0x1A5, "Entered Water Temple" },
{ 0x1A6, "Entered Spirit Temple" },
{ 0x1A7, "Entered Shadow Temple" },
{ 0x1A8, "Entered Bottom of the Well" },
{ 0x1A9, "Entered Ice Cavern" },
{ 0x1AA, "Entered Ganon's Tower" },
{ 0x1AB, "Entered Gerudo Training Ground" },
{ 0x1AC, "Entered Thieves' Hideout" },
{ 0x1AD, "Entered Ganon's Castle" },
{ 0x1AE, "Entered Ganon's Tower (Collapsing)" },
{ 0x1AF, "Entered Ganon's Castle (Collapsing)" },
{ 0x1D0, "No Sword on B" },
} },
{ "Event Inf Flags", EVENT_INF, 0x03, {
{ 0x00, "Rented Horse From Ingo" },
{ 0x01, "Racing Ingo" },
{ 0x02, "Won First Race With Ingo?" },
{ 0x05, "Lost Race With Ingo?" },
{ 0x06, "Racing Ingo For the Second Time" },
{ 0x08, "Finished Special Cucco Minigame / Began Gerudo Archery" },
{ 0x0A, "Won Special Cucco Minigame?" },
{ 0x0F, "Rented Horse From Ingo" },
{ 0x10, "Racing Running Man" },
{ 0x20, "Market Crowd Text Randomizer" },
{ 0x21, "Market Crowd Text Randomizer" },
{ 0x22, "Market Crowd Text Randomizer" },
{ 0x23, "Market Crowd Text Randomizer" },
{ 0x24, "Market Crowd Text Randomizer" },
{ 0x30, "Entered the Market" },
} },
{ "Randomizer Inf Flags", RANDOMIZER_INF, 0x03, {
{ RAND_INF_DUNGEONS_DONE_DEKU_TREE, "DUNGEONS_DONE_DEKU_TREE" },
{ RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN, "DUNGEONS_DONE_DODONGOS_CAVERN" },
{ RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY, "DUNGEONS_DONE_JABU_JABUS_BELLY" },
{ RAND_INF_DUNGEONS_DONE_FOREST_TEMPLE, "DUNGEONS_DONE_FOREST_TEMPLE" },
{ RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE, "DUNGEONS_DONE_FIRE_TEMPLE" },
{ RAND_INF_DUNGEONS_DONE_WATER_TEMPLE, "DUNGEONS_DONE_WATER_TEMPLE" },
{ RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE, "DUNGEONS_DONE_SPIRIT_TEMPLE" },
{ RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE, "DUNGEONS_DONE_SHADOW_TEMPLE" },
{ RAND_INF_TRIALS_DONE_LIGHT_TRIAL, "TRIALS_DONE_LIGHT_TRIAL" },
{ RAND_INF_TRIALS_DONE_FOREST_TRIAL, "TRIALS_DONE_FOREST_TRIAL" },
{ RAND_INF_TRIALS_DONE_FIRE_TRIAL, "TRIALS_DONE_FIRE_TRIAL" },
{ RAND_INF_TRIALS_DONE_WATER_TRIAL, "TRIALS_DONE_WATER_TRIAL" },
{ RAND_INF_TRIALS_DONE_SPIRIT_TRIAL, "TRIALS_DONE_SPIRIT_TRIAL" },
{ RAND_INF_TRIALS_DONE_SHADOW_TRIAL, "TRIALS_DONE_SHADOW_TRIAL" },
{ RAND_INF_COWS_MILKED_LINKS_HOUSE_COW, "COWS_MILKED_LINKS_HOUSE_COW" },
{ RAND_INF_COWS_MILKED_HF_COW_GROTTO_COW, "COWS_MILKED_HF_COW_GROTTO_COW" },
{ RAND_INF_COWS_MILKED_LLR_STABLES_LEFT_COW, "COWS_MILKED_LLR_STABLES_LEFT_COW" },
{ RAND_INF_COWS_MILKED_LLR_STABLES_RIGHT_COW, "COWS_MILKED_LLR_STABLES_RIGHT_COW" },
{ RAND_INF_COWS_MILKED_LLR_TOWER_LEFT_COW, "COWS_MILKED_LLR_TOWER_LEFT_COW" },
{ RAND_INF_COWS_MILKED_LLR_TOWER_RIGHT_COW, "COWS_MILKED_LLR_TOWER_RIGHT_COW" },
{ RAND_INF_COWS_MILKED_KAK_IMPAS_HOUSE_COW, "COWS_MILKED_KAK_IMPAS_HOUSE_COW" },
{ RAND_INF_COWS_MILKED_DMT_COW_GROTTO_COW, "COWS_MILKED_DMT_COW_GROTTO_COW" },
{ RAND_INF_COWS_MILKED_GV_COW, "COWS_MILKED_GV_COW" },
{ RAND_INF_COWS_MILKED_JABU_JABUS_BELLY_MQ_COW, "COWS_MILKED_JABU_JABUS_BELLY_MQ_COW" },
{ RAND_INF_COWS_MILKED_HF_COW_GROTTO_GOSSIP_STONE, "COWS_MILKED_HF_COW_GROTTO_GOSSIP_STONE" },
{ RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT, "SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT" },
{ RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_SIDE_ROOM_NEAR_DODONGOS, "SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_SIDE_ROOM_NEAR_DODONGOS" },
{ RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_RIGHT, "SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_RIGHT" },
{ RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_LOBBY, "SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_LOBBY" },
{ RAND_INF_SCRUBS_PURCHASED_JABU_JABUS_BELLY_DEKU_SCRUB, "SCRUBS_PURCHASED_JABU_JABUS_BELLY_DEKU_SCRUB" },
{ RAND_INF_SCRUBS_PURCHASED_GANONS_CASTLE_DEKU_SCRUB_CENTER_LEFT, "SCRUBS_PURCHASED_GANONS_CASTLE_DEKU_SCRUB_CENTER_LEFT" },
{ RAND_INF_SCRUBS_PURCHASED_GANONS_CASTLE_DEKU_SCRUB_CENTER_RIGHT, "SCRUBS_PURCHASED_GANONS_CASTLE_DEKU_SCRUB_CENTER_RIGHT" },
{ RAND_INF_SCRUBS_PURCHASED_GANONS_CASTLE_DEKU_SCRUB_RIGHT, "SCRUBS_PURCHASED_GANONS_CASTLE_DEKU_SCRUB_RIGHT" },
{ RAND_INF_SCRUBS_PURCHASED_GANONS_CASTLE_DEKU_SCRUB_LEFT, "SCRUBS_PURCHASED_GANONS_CASTLE_DEKU_SCRUB_LEFT" },
{ RAND_INF_SCRUBS_PURCHASED_HF_DEKU_SCRUB_GROTTO, "SCRUBS_PURCHASED_HF_DEKU_SCRUB_GROTTO" },
{ RAND_INF_SCRUBS_PURCHASED_ZR_DEKU_SCRUB_GROTTO_REAR, "SCRUBS_PURCHASED_ZR_DEKU_SCRUB_GROTTO_REAR" },
{ RAND_INF_SCRUBS_PURCHASED_ZR_DEKU_SCRUB_GROTTO_FRONT, "SCRUBS_PURCHASED_ZR_DEKU_SCRUB_GROTTO_FRONT" },
{ RAND_INF_SCRUBS_PURCHASED_SFM_DEKU_SCRUB_GROTTO_REAR, "SCRUBS_PURCHASED_SFM_DEKU_SCRUB_GROTTO_REAR" },
{ RAND_INF_SCRUBS_PURCHASED_SFM_DEKU_SCRUB_GROTTO_FRONT, "SCRUBS_PURCHASED_SFM_DEKU_SCRUB_GROTTO_FRONT" },
{ RAND_INF_SCRUBS_PURCHASED_LH_DEKU_SCRUB_GROTTO_LEFT, "SCRUBS_PURCHASED_LH_DEKU_SCRUB_GROTTO_LEFT" },
{ RAND_INF_SCRUBS_PURCHASED_LH_DEKU_SCRUB_GROTTO_RIGHT, "SCRUBS_PURCHASED_LH_DEKU_SCRUB_GROTTO_RIGHT" },
{ RAND_INF_SCRUBS_PURCHASED_LH_DEKU_SCRUB_GROTTO_CENTER, "SCRUBS_PURCHASED_LH_DEKU_SCRUB_GROTTO_CENTER" },
{ RAND_INF_SCRUBS_PURCHASED_GV_DEKU_SCRUB_GROTTO_REAR, "SCRUBS_PURCHASED_GV_DEKU_SCRUB_GROTTO_REAR" },
{ RAND_INF_SCRUBS_PURCHASED_GV_DEKU_SCRUB_GROTTO_FRONT, "SCRUBS_PURCHASED_GV_DEKU_SCRUB_GROTTO_FRONT" },
{ RAND_INF_SCRUBS_PURCHASED_LW_DEKU_SCRUB_GROTTO_REAR, "SCRUBS_PURCHASED_LW_DEKU_SCRUB_GROTTO_REAR" },
{ RAND_INF_SCRUBS_PURCHASED_LW_DEKU_SCRUB_GROTTO_FRONT, "SCRUBS_PURCHASED_LW_DEKU_SCRUB_GROTTO_FRONT" },
{ RAND_INF_SCRUBS_PURCHASED_DMC_DEKU_SCRUB_GROTTO_LEFT, "SCRUBS_PURCHASED_DMC_DEKU_SCRUB_GROTTO_LEFT" },
{ RAND_INF_SCRUBS_PURCHASED_DMC_DEKU_SCRUB_GROTTO_RIGHT, "SCRUBS_PURCHASED_DMC_DEKU_SCRUB_GROTTO_RIGHT" },
{ RAND_INF_SCRUBS_PURCHASED_DMC_DEKU_SCRUB_GROTTO_CENTER, "SCRUBS_PURCHASED_DMC_DEKU_SCRUB_GROTTO_CENTER" },
{ RAND_INF_SCRUBS_PURCHASED_GC_DEKU_SCRUB_GROTTO_LEFT, "SCRUBS_PURCHASED_GC_DEKU_SCRUB_GROTTO_LEFT" },
{ RAND_INF_SCRUBS_PURCHASED_GC_DEKU_SCRUB_GROTTO_RIGHT, "SCRUBS_PURCHASED_GC_DEKU_SCRUB_GROTTO_RIGHT" },
{ RAND_INF_SCRUBS_PURCHASED_GC_DEKU_SCRUB_GROTTO_CENTER, "SCRUBS_PURCHASED_GC_DEKU_SCRUB_GROTTO_CENTER" },
{ RAND_INF_SCRUBS_PURCHASED_LLR_DEKU_SCRUB_GROTTO_LEFT, "SCRUBS_PURCHASED_LLR_DEKU_SCRUB_GROTTO_LEFT" },
{ RAND_INF_SCRUBS_PURCHASED_LLR_DEKU_SCRUB_GROTTO_RIGHT, "SCRUBS_PURCHASED_LLR_DEKU_SCRUB_GROTTO_RIGHT" },
{ RAND_INF_SCRUBS_PURCHASED_LLR_DEKU_SCRUB_GROTTO_CENTER, "SCRUBS_PURCHASED_LLR_DEKU_SCRUB_GROTTO_CENTER" },
{ RAND_INF_SCRUBS_PURCHASED_COLOSSUS_DEKU_SCRUB_GROTTO_REAR, "SCRUBS_PURCHASED_COLOSSUS_DEKU_SCRUB_GROTTO_REAR" },
{ RAND_INF_SCRUBS_PURCHASED_COLOSSUS_DEKU_SCRUB_GROTTO_FRONT, "SCRUBS_PURCHASED_COLOSSUS_DEKU_SCRUB_GROTTO_FRONT" },
{ RAND_INF_SCRUBS_PURCHASED_LW_DEKU_SCRUB_NEAR_DEKU_THEATER_RIGHT, "SCRUBS_PURCHASED_LW_DEKU_SCRUB_NEAR_DEKU_THEATER_RIGHT" },
{ RAND_INF_SCRUBS_PURCHASED_LW_DEKU_SCRUB_NEAR_DEKU_THEATER_LEFT, "SCRUBS_PURCHASED_LW_DEKU_SCRUB_NEAR_DEKU_THEATER_LEFT" },
{ RAND_INF_SCRUBS_PURCHASED_LW_DEKU_SCRUB_NEAR_BRIDGE, "SCRUBS_PURCHASED_LW_DEKU_SCRUB_NEAR_BRIDGE" },
{ RAND_INF_SCRUBS_PURCHASED_DMC_DEKU_SCRUB, "SCRUBS_PURCHASED_DMC_DEKU_SCRUB" },
} },
};

29
soh/soh/Enhancements/item-tables/ItemTableTypes.h

@ -6,13 +6,32 @@ @@ -6,13 +6,32 @@
#define CHEST_ANIM_SHORT 0
#define CHEST_ANIM_LONG 1
/**
* Flag to indicate which type of Actor has given the player an item. ITEM_FROM_NPC by default,
* should be set by the actor giving the item before they send the GetItemEntry signal to the player.
* ITEM_FROM_NPC is the default for the GET_ITEM macro so that the random NPC actors giving items
* don't need to manually update the GetItemEntry before sending it to the player. Instead just the
* specific actors (item00, en_box, en_si, etc.) can set their corresponding ITEM_FROM value.
*/
typedef enum GetItemFrom {
ITEM_FROM_NPC,
ITEM_FROM_SKULLTULA,
ITEM_FROM_FREESTANDING,
ITEM_FROM_CHEST,
} GetItemFrom;
#define GET_ITEM(itemId, objectId, drawId, textId, field, chestAnim, modIndex, getItemId) \
{ itemId, field, (chestAnim != CHEST_ANIM_SHORT ? 1 : -1) * (drawId + 1), textId, objectId, modIndex, getItemId, drawId, true }
{ itemId, field, (chestAnim != CHEST_ANIM_SHORT ? 1 : -1) * (drawId + 1), textId, objectId, modIndex, getItemId, drawId, true, ITEM_FROM_NPC, NULL }
#define GET_ITEM_NONE \
{ ITEM_NONE, 0, 0, 0, 0, 0, 0, 0, false }
{ ITEM_NONE, 0, 0, 0, 0, 0, 0, 0, false, ITEM_FROM_NPC, NULL }
typedef struct GlobalContext GlobalContext;
typedef struct GetItemEntry GetItemEntry;
typedef void (*CustomDrawFunc)(GlobalContext* globalCtx, GetItemEntry* getItemEntry);
typedef struct {
typedef struct GetItemEntry {
/* 0x00 */ uint16_t itemId;
/* 0x01 */ uint16_t field; // various bit-packed data
/* 0x02 */ int16_t gi; // defines the draw id and chest opening animation
@ -22,4 +41,6 @@ typedef struct { @@ -22,4 +41,6 @@ typedef struct {
/* 0x08 */ int16_t getItemId;
/* 0x0A */ uint16_t gid; // Stores the GID value unmodified for future reference.
/* 0x0C */ uint16_t collectable; // determines whether the item can be collected on the overworld. Will be true in most cases.
} GetItemEntry; // size = 0x0F
/* 0x0E */ GetItemFrom getItemFrom;
CustomDrawFunc drawFunc;
}; // size = 0x0F

2
soh/soh/Enhancements/randomizer/3drando/custom_messages.cpp

@ -257,7 +257,7 @@ constexpr std::array DungeonColors = { @@ -257,7 +257,7 @@ constexpr std::array DungeonColors = {
//Tycoon's Wallet
CreateMessage(0x09F7, 0, 2, 3,
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_WALLET_GIANT)+INSTANT_TEXT_ON()+"You got a "+COLOR(QM_RED)+"Tycoon's Wallet"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+NEWLINE()+"It's gigantic! Now you can carry"+NEWLINE()+"up to "+COLOR(QM_YELLOW)+"999 "+COLOR(QM_WHITE)+COLOR(QM_YELLOW)+"Rupees"+COLOR(QM_WHITE)+"!"+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_WALLET_GIANT)+INSTANT_TEXT_ON()+"Vous obtenez la "+COLOR(QM_RED)+"Bourse de star"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+NEWLINE()+"Elle peut contenir jusqu'à "+COLOR(QM_YELLOW)+"999 "+COLOR(QM_WHITE)+COLOR(QM_YELLOW)+"rubis"+COLOR(QM_WHITE)+"!"+NEWLINE()+"C'est gigantesque!"+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_WALLET_GIANT)+INSTANT_TEXT_ON()+"Vous obtenez la "+COLOR(QM_RED)+"Bourse de Magnat"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+NEWLINE()+"Elle peut contenir jusqu'à "+COLOR(QM_YELLOW)+"999 "+COLOR(QM_WHITE)+COLOR(QM_YELLOW)+"rubis"+COLOR(QM_WHITE)+"!"+NEWLINE()+"C'est gigantesque!"+MESSAGE_END(),
UNSKIPPABLE()+ITEM_OBTAINED(ITEM_WALLET_GIANT)+INSTANT_TEXT_ON()+"¡Has conseguido una "+COLOR(QM_RED)+"bolsa para ricachones"+COLOR(QM_WHITE)+"!"+INSTANT_TEXT_OFF()+NEWLINE()+"¡Qué descomunal! Ya puedes llevar"+NEWLINE()+"hasta "+COLOR(QM_YELLOW)+"999 "+COLOR(QM_WHITE)+COLOR(QM_YELLOW)+"rupias"+COLOR(QM_WHITE)+"!"+MESSAGE_END());
//Saria's Song Default Hint
CreateMessage(0x0A00, 0, 2, 3,

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

@ -1039,6 +1039,19 @@ int Fill() { @@ -1039,6 +1039,19 @@ int Fill() {
//Fast fill for the rest of the pool
std::vector<uint32_t> remainingPool = FilterAndEraseFromPool(ItemPool, [](const auto i) { return true; });
FastFill(remainingPool, GetAllEmptyLocations(), false);
//Add prices for scrubsanity, this is unique to SoH because we write/read scrub prices to/from the spoilerfile.
if (Scrubsanity.Is(SCRUBSANITY_AFFORDABLE)) {
for (size_t i = 0; i < ScrubLocations.size(); i++) {
Location(ScrubLocations[i])->SetScrubsanityPrice(10);
}
} else if (Scrubsanity.Is(SCRUBSANITY_RANDOM_PRICES)) {
for (size_t i = 0; i < ScrubLocations.size(); i++) {
int randomPrice = GetRandomScrubPrice();