From fe8641cab468473aeab0f14ac146d9b05007f689 Mon Sep 17 00:00:00 2001 From: aMannus Date: Thu, 14 Jul 2022 10:45:42 +0200 Subject: [PATCH 01/30] not yet --- soh/randomizerTypes.h | 1 + .../Enhancements/randomizer/3drando/settings.cpp | 1 + soh/soh/Enhancements/randomizer/randomizer.cpp | 15 +++++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/soh/randomizerTypes.h b/soh/randomizerTypes.h index 551966828..a35fe4572 100644 --- a/soh/randomizerTypes.h +++ b/soh/randomizerTypes.h @@ -973,6 +973,7 @@ typedef enum { RSK_STARTING_MAPS_COMPASSES, //RANDOTODO more options for this, rn it's just start with or own dungeon RSK_SHUFFLE_DUNGEON_REWARDS, RSK_SHUFFLE_SONGS, + RSK_SHUFFLE_TOKENS, RSK_SHUFFLE_WEIRD_EGG, RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD, RSK_ITEM_POOL, diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.cpp b/soh/soh/Enhancements/randomizer/3drando/settings.cpp index 05fc10c4b..6807c9052 100644 --- a/soh/soh/Enhancements/randomizer/3drando/settings.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/settings.cpp @@ -2488,6 +2488,7 @@ namespace Settings { ShuffleRewards.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS]); ShuffleSongs.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_SONGS]); + Tokensanity.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_TOKENS]); ShuffleKokiriSword.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_KOKIRI_SWORD]); ShuffleOcarinas.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_OCARINA]); diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 09704e867..354c6f7fc 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3016,6 +3016,10 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_GRAVEYARD_DAMPE_GRAVEDIGGING_TOUR; case 14346: return RC_GY_GOSSIP_STONE; + case 20608: + return RC_GRAVEYARD_GS_WALL; + //case 0: + //return RC_GRAVEYARD_GS_BEAN_PATCH; } break; case 84: @@ -3217,8 +3221,8 @@ void GenerateRandomizerImgui() { cvarSettings[RSK_STARTING_DEKU_SHIELD] = CVar_GetS32("gRandomizeStartingDekuShield", 0); cvarSettings[RSK_STARTING_MAPS_COMPASSES] = CVar_GetS32("gRandomizeStartingMapsCompasses", 0); cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS] = CVar_GetS32("gRandomizeShuffleDungeonReward", 0); - cvarSettings[RSK_SHUFFLE_SONGS] = CVar_GetS32("gRandomizeShuffleSongs", 0); - + cvarSettings[RSK_SHUFFLE_SONGS] = CVar_GetS32("gRandomizeShuffleTokens", 0); + cvarSettings[RSK_SHUFFLE_TOKENS] = CVar_GetS32("gRandomizeShuffleTokens", 0); cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVar_GetS32("gRandomizeSkipChildZelda", 0); // if we skip child zelda, we start with zelda's letter, and malon starts @@ -3301,6 +3305,7 @@ void DrawRandoEditor(bool& open) { const char* randoShuffleDungeonRewards[4] = { "End of Dungeons", "Any Dungeon", "Overworld", "Anywhere" }; const char* randoLinksPocket[4] = { "Dungeon Reward", "Advancement", "Anything", "Nothing" }; const char* randoShuffleSongs[3] = { "Song Locations", "Dungeon Rewards", "Anywhere" }; + const char* randoShuffleTokens[4] = { "Off", "Dungeons", "Overworld", "All Tokens" }; const char* randoShopsanity[7] = { "Off", "0", "1", "2", "3", "4", "Random" }; const char* randoTokensanity[4] = { "Off", "Dungeons", "Overworld", "All Tokens" }; const char* randoShuffleScrubs[4] = { "Off", "Affordable", "Expensive", "Random Prices" }; @@ -3911,6 +3916,12 @@ void DrawRandoEditor(bool& open) { SohImGui::EnhancementCombobox("gRandomizeShuffleSongs", randoShuffleSongs, 3, 0); ImGui::Separator(); + // Shuffle Tokens + ImGui::Text("Shuffle Tokens"); + InsertHelpHoverText("Spoopy"); + SohImGui::EnhancementCombobox("gRandomizeShuffleTokens", randoShuffleTokens, 4, 0); + ImGui::Separator(); + // todo implement shops // // Shopsanity // ImGui::Text("Shopsanity"); From ac099018e4252a165757f4a6cfafa9e8eacea9dd Mon Sep 17 00:00:00 2001 From: aMannus Date: Fri, 15 Jul 2022 14:56:52 +0200 Subject: [PATCH 02/30] still nothing yet --- soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 51a512855..14d0df072 100644 --- a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -613,9 +613,18 @@ void func_80B0D878(EnSw* this, GlobalContext* globalCtx) { x = (this->unk_364.x * 10.0f); y = (this->unk_364.y * 10.0f); z = (this->unk_364.z * 10.0f); - temp_v0 = - Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_SI, this->actor.world.pos.x + x, - this->actor.world.pos.y + y, this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); + if (!(gSaveContext.n64ddFlag)) { + temp_v0 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_SI, + this->actor.world.pos.x + x, this->actor.world.pos.y + y, + this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); + } else { + s32 getItemId = GI_NONE; + getItemId = GetRandomizedItemId(getItemId, this->actor.id, this->actor.params, globalCtx->sceneNum); + temp_v0 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, getItemId, + this->actor.world.pos.x + x, this->actor.world.pos.y + y, + this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); + } + if (temp_v0 != NULL) { temp_v0->parent = NULL; } From 0f1f8c15f2cef9b01ecf67011066e7ff9bc9210a Mon Sep 17 00:00:00 2001 From: aMannus Date: Sat, 16 Jul 2022 12:20:53 +0200 Subject: [PATCH 03/30] Closer but not yet --- soh/src/overlays/actors/ovl_En_Si/z_en_si.c | 28 ++++++++++++++++++--- soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c | 14 +++-------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index 7bd83a997..d5abb0481 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -93,7 +93,12 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) { this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER; - Item_Give(globalCtx, ITEM_SKULL_TOKEN); + s32 getItemId = ITEM_SKULL_TOKEN; + if (gSaveContext.n64ddFlag) { + getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + } + //getItemId = ITEM_DINS_FIRE; + Item_Give(globalCtx, getItemId); if (CVar_GetS32("gSkulltulaFreeze", 0) != 1) { player->actor.freezeTimer = 20; } @@ -117,7 +122,12 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { this->actor.shape.rot.y += 0x400; if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { - Item_Give(globalCtx, ITEM_SKULL_TOKEN); + s32 getItemId = ITEM_SKULL_TOKEN; + if (gSaveContext.n64ddFlag) { + getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + } + //getItemId = ITEM_DINS_FIRE; + Item_Give(globalCtx, getItemId); Message_StartTextbox(globalCtx, 0xB4, NULL); Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); this->actionFunc = func_80AFB950; @@ -150,6 +160,18 @@ void EnSi_Draw(Actor* thisx, GlobalContext* globalCtx) { if (this->actionFunc != func_80AFB950) { func_8002ED80(&this->actor, globalCtx, 0); func_8002EBCC(&this->actor, globalCtx, 0); - GetItem_Draw(globalCtx, GID_SKULL_TOKEN_2); + if (!gSaveContext.n64ddFlag) { + GetItem_Draw(globalCtx, GID_SKULL_TOKEN_2); + } else { + f32 mtxScale = 1.5f; + Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); + s32 randoGetItemId = + GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { + EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); + } + GetItem_Draw(globalCtx, GetItemModelFromId(randoGetItemId)); + } + } } diff --git a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 14d0df072..69fc0595a 100644 --- a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -613,17 +613,9 @@ void func_80B0D878(EnSw* this, GlobalContext* globalCtx) { x = (this->unk_364.x * 10.0f); y = (this->unk_364.y * 10.0f); z = (this->unk_364.z * 10.0f); - if (!(gSaveContext.n64ddFlag)) { - temp_v0 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_SI, - this->actor.world.pos.x + x, this->actor.world.pos.y + y, - this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); - } else { - s32 getItemId = GI_NONE; - getItemId = GetRandomizedItemId(getItemId, this->actor.id, this->actor.params, globalCtx->sceneNum); - temp_v0 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, getItemId, - this->actor.world.pos.x + x, this->actor.world.pos.y + y, - this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); - } + temp_v0 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_SI, + this->actor.world.pos.x + x, this->actor.world.pos.y + y, + this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); if (temp_v0 != NULL) { temp_v0->parent = NULL; From 4ccd4d58952851337ad171fce5732d0802dfcea9 Mon Sep 17 00:00:00 2001 From: aMannus Date: Sun, 17 Jul 2022 16:02:27 +0200 Subject: [PATCH 04/30] Exposed static table to change skulltokens This static table is normally only used within z_player.c, but is needed to switch the itemId to something Item_Give() can use and to set the correct TextId. --- soh/include/z64player.h | 10 ++++++++ soh/src/overlays/actors/ovl_En_Si/z_en_si.c | 24 +++++++++++-------- soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c | 1 - .../actors/ovl_player_actor/z_player.c | 11 ++------- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/soh/include/z64player.h b/soh/include/z64player.h index 954c36c14..6128a57d8 100644 --- a/soh/include/z64player.h +++ b/soh/include/z64player.h @@ -5,6 +5,16 @@ struct Player; +typedef struct { + /* 0x00 */ u8 itemId; + /* 0x01 */ u8 field; // various bit-packed data + /* 0x02 */ s8 gi; // defines the draw id and chest opening animation + /* 0x03 */ u8 textId; + /* 0x04 */ u16 objectId; +} GetItemEntry; // size = 0x06 + +extern GetItemEntry sGetItemTable[160]; + typedef enum { /* 0 */ PLAYER_SWORD_NONE, /* 1 */ PLAYER_SWORD_KOKIRI, diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index d5abb0481..bf8a93c4c 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -93,16 +93,18 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) { this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER; - s32 getItemId = ITEM_SKULL_TOKEN; + s32 textId = 0xB4; + s32 itemGiveId = ITEM_SKULL_TOKEN; if (gSaveContext.n64ddFlag) { - getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + s32 getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + textId = sGetItemTable[getItemId - 1].textId; + itemGiveId = sGetItemTable[getItemId - 1].itemId; } - //getItemId = ITEM_DINS_FIRE; - Item_Give(globalCtx, getItemId); + Item_Give(globalCtx, itemGiveId); if (CVar_GetS32("gSkulltulaFreeze", 0) != 1) { player->actor.freezeTimer = 20; } - Message_StartTextbox(globalCtx, 0xB4, NULL); + Message_StartTextbox(globalCtx, textId, NULL); Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); this->actionFunc = func_80AFB950; } else { @@ -122,13 +124,15 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { this->actor.shape.rot.y += 0x400; if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { - s32 getItemId = ITEM_SKULL_TOKEN; + s32 textId = 0xB4; + s32 itemGiveId = ITEM_SKULL_TOKEN; if (gSaveContext.n64ddFlag) { - getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + s32 getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + textId = sGetItemTable[getItemId - 1].textId; + itemGiveId = sGetItemTable[getItemId - 1].itemId; } - //getItemId = ITEM_DINS_FIRE; - Item_Give(globalCtx, getItemId); - Message_StartTextbox(globalCtx, 0xB4, NULL); + Item_Give(globalCtx, itemGiveId); + Message_StartTextbox(globalCtx, textId, NULL); Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); this->actionFunc = func_80AFB950; } diff --git a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 69fc0595a..864fa2270 100644 --- a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -616,7 +616,6 @@ void func_80B0D878(EnSw* this, GlobalContext* globalCtx) { temp_v0 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_SI, this->actor.world.pos.x + x, this->actor.world.pos.y + y, this->actor.world.pos.z + z, 0, 0, 0, this->actor.params); - if (temp_v0 != NULL) { temp_v0->parent = NULL; } diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 1973a09a4..330c53738 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6,6 +6,7 @@ #include "ultra64.h" #include "global.h" +#include "z64player.h" #include "overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h" #include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h" @@ -21,14 +22,6 @@ #include "objects/object_link_child/object_link_child.h" #include "textures/icon_item_24_static/icon_item_24_static.h" -typedef struct { - /* 0x00 */ u8 itemId; - /* 0x01 */ u8 field; // various bit-packed data - /* 0x02 */ s8 gi; // defines the draw id and chest opening animation - /* 0x03 */ u8 textId; - /* 0x04 */ u16 objectId; -} GetItemEntry; // size = 0x06 - #define GET_ITEM(itemId, objectId, drawId, textId, field, chestAnim) \ { itemId, field, (chestAnim != CHEST_ANIM_SHORT ? 1 : -1) * (drawId + 1), textId, objectId } @@ -496,7 +489,7 @@ static u16 D_8085361C[] = { NA_SE_VO_LI_FALL_L, }; -static GetItemEntry sGetItemTable[] = { +GetItemEntry sGetItemTable[] = { GET_ITEM(ITEM_BOMBS_5, OBJECT_GI_BOMB_1, GID_BOMB, 0x32, 0x59, CHEST_ANIM_SHORT), GET_ITEM(ITEM_NUTS_5, OBJECT_GI_NUTS, GID_NUTS, 0x34, 0x0C, CHEST_ANIM_SHORT), GET_ITEM(ITEM_BOMBCHU, OBJECT_GI_BOMB_2, GID_BOMBCHU, 0x33, 0x80, CHEST_ANIM_SHORT), From 0da14603e2c97b69ac63e0ffeaff2b18ae4a77c3 Mon Sep 17 00:00:00 2001 From: aMannus Date: Sun, 17 Jul 2022 23:50:48 +0200 Subject: [PATCH 05/30] Freeze fix/first batch of skull actors --- .../Enhancements/randomizer/randomizer.cpp | 28 +++++++++++++++++++ soh/src/overlays/actors/ovl_En_Si/z_en_si.c | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 354c6f7fc..a7d23c443 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -2960,6 +2960,12 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_HF_COW_GROTTO_GOSSIP_STONE; case 14355: return RC_HC_STORMS_GROTTO_GOSSIP_STONE; + case 10753: + return RC_HF_GS_COW_GROTTO; + case 10754: + return RC_HF_GS_NEAR_KAK_GROTTO; + case 11778: + return RC_HC_GS_STORMS_GROTTO; default: return RC_UNKNOWN_CHECK; } @@ -2998,6 +3004,12 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_LLR_FREESTANDING_POH; } break; + case 77: + switch (actorParams) { + case -29176: + return RC_MARKET_GS_GUARD_HOUSE; + } + break; case 82: switch (actorId) { case 316: @@ -3044,6 +3056,12 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_KF_DEKU_TREE_RIGHT_GOSSIP_STONE; case 14623: return RC_KF_DEKU_TREE_LEFT_GOSSIP_STONE; + case 19458: + return RC_KF_GS_KNOW_IT_ALL_HOUSE; + case 27649: + return RC_KF_GS_BEAN_PATCH; + case 19460: + return RC_KF_GS_HOUSE_OF_TWINS; } break; case 86: @@ -3054,6 +3072,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_SFM_MAZE_UPPER_GOSSIP_STONE; case 14876: return RC_SFM_SARIA_GOSSIP_STONE; + case 19720: + return RC_SFM_GS; } break; case 87: @@ -3116,6 +3136,12 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_LW_DEKU_SCRUB_NEAR_BRIDGE; case 14365: return RC_LW_GOSSIP_STONE; + case 27905: + return RC_LW_GS_BEAN_PATCH_NEAR_BRIDGE; + case 27906: + return RC_LW_GS_BEAN_PATCH_NEAR_THEATER; + case 19716: + return RC_LW_GS_ABOVE_THEATER; } break; case 92: @@ -3149,6 +3175,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_HC_MALON_GOSSIP_STONE; case 14347: return RC_HC_ROCK_WALL_GOSSIP_STONE; + case -29180: + return RC_HC_GS_TREE; } break; case 96: diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index bf8a93c4c..9293a436f 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -101,7 +101,7 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { itemGiveId = sGetItemTable[getItemId - 1].itemId; } Item_Give(globalCtx, itemGiveId); - if (CVar_GetS32("gSkulltulaFreeze", 0) != 1) { + if (CVar_GetS32("gSkulltulaFreeze", 0) != 1 || itemGiveId != ITEM_SKULL_TOKEN) { player->actor.freezeTimer = 20; } Message_StartTextbox(globalCtx, textId, NULL); From 3b747b41becd8296b8e14b291426ca77f94fc9dc Mon Sep 17 00:00:00 2001 From: aMannus Date: Mon, 18 Jul 2022 09:05:32 +0200 Subject: [PATCH 06/30] Cleanup and freeze fix Don't freeze the player when the skulltula token check is something else than a token. Also some cleanup and declaring variables more globally within z_en_si.c --- soh/src/overlays/actors/ovl_En_Si/z_en_si.c | 40 ++++++++++--------- .../actors/ovl_player_actor/z_player.c | 1 - 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index 9293a436f..91fe0126c 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -18,6 +18,10 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx); void func_80AFB89C(EnSi* this, GlobalContext* globalCtx); void func_80AFB950(EnSi* this, GlobalContext* globalCtx); +s32 textId = 0xB4; +s32 giveItemId = ITEM_SKULL_TOKEN; +s32 getItemId; + static ColliderCylinderInit sCylinderInit = { { COLTYPE_NONE, @@ -93,15 +97,13 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) { this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER; - s32 textId = 0xB4; - s32 itemGiveId = ITEM_SKULL_TOKEN; if (gSaveContext.n64ddFlag) { - s32 getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); textId = sGetItemTable[getItemId - 1].textId; - itemGiveId = sGetItemTable[getItemId - 1].itemId; + giveItemId = sGetItemTable[getItemId - 1].itemId; } - Item_Give(globalCtx, itemGiveId); - if (CVar_GetS32("gSkulltulaFreeze", 0) != 1 || itemGiveId != ITEM_SKULL_TOKEN) { + Item_Give(globalCtx, giveItemId); + if (CVar_GetS32("gSkulltulaFreeze", 0) != 1 || giveItemId != ITEM_SKULL_TOKEN) { player->actor.freezeTimer = 20; } Message_StartTextbox(globalCtx, textId, NULL); @@ -124,14 +126,12 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { this->actor.shape.rot.y += 0x400; if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { - s32 textId = 0xB4; - s32 itemGiveId = ITEM_SKULL_TOKEN; if (gSaveContext.n64ddFlag) { - s32 getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + giveItemId = sGetItemTable[getItemId - 1].itemId; textId = sGetItemTable[getItemId - 1].textId; - itemGiveId = sGetItemTable[getItemId - 1].itemId; } - Item_Give(globalCtx, itemGiveId); + Item_Give(globalCtx, giveItemId); Message_StartTextbox(globalCtx, textId, NULL); Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); this->actionFunc = func_80AFB950; @@ -141,7 +141,7 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { void func_80AFB950(EnSi* this, GlobalContext* globalCtx) { Player* player = GET_PLAYER(globalCtx); - if (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_CLOSING && CVar_GetS32("gSkulltulaFreeze", 0) != 1) { + if (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_CLOSING && (CVar_GetS32("gSkulltulaFreeze", 0) != 1 || giveItemId != ITEM_SKULL_TOKEN)) { player->actor.freezeTimer = 10; } else { SET_GS_FLAGS((this->actor.params & 0x1F00) >> 8, this->actor.params & 0xFF); @@ -167,14 +167,16 @@ void EnSi_Draw(Actor* thisx, GlobalContext* globalCtx) { if (!gSaveContext.n64ddFlag) { GetItem_Draw(globalCtx, GID_SKULL_TOKEN_2); } else { - f32 mtxScale = 1.5f; - Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); - s32 randoGetItemId = - GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); - if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { - EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); + f32 mtxScale; + getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + if (getItemId >= GI_MINUET_OF_FOREST && getItemId <= GI_DOUBLE_DEFENSE) { + EnItem00_CustomItemsParticles(&this->actor, globalCtx, getItemId); } - GetItem_Draw(globalCtx, GetItemModelFromId(randoGetItemId)); + if (getItemId != ITEM_SKULL_TOKEN) { + mtxScale = 1.5f; + Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); + } + GetItem_Draw(globalCtx, GetItemModelFromId(getItemId)); } } diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 330c53738..6f4800a9f 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6,7 +6,6 @@ #include "ultra64.h" #include "global.h" -#include "z64player.h" #include "overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h" #include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h" From 06c3c2ba67317a5d5c3b71aa9b087b4c228f3383 Mon Sep 17 00:00:00 2001 From: aMannus Date: Mon, 18 Jul 2022 09:10:36 +0200 Subject: [PATCH 07/30] Fixed mistake --- soh/soh/Enhancements/randomizer/randomizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index a7d23c443..2bdc7f505 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3249,7 +3249,7 @@ void GenerateRandomizerImgui() { cvarSettings[RSK_STARTING_DEKU_SHIELD] = CVar_GetS32("gRandomizeStartingDekuShield", 0); cvarSettings[RSK_STARTING_MAPS_COMPASSES] = CVar_GetS32("gRandomizeStartingMapsCompasses", 0); cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS] = CVar_GetS32("gRandomizeShuffleDungeonReward", 0); - cvarSettings[RSK_SHUFFLE_SONGS] = CVar_GetS32("gRandomizeShuffleTokens", 0); + cvarSettings[RSK_SHUFFLE_SONGS] = CVar_GetS32("gRandomizeShuffleSongs", 0); cvarSettings[RSK_SHUFFLE_TOKENS] = CVar_GetS32("gRandomizeShuffleTokens", 0); cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVar_GetS32("gRandomizeSkipChildZelda", 0); From 3341c3d404b669994a3f9baf84771e2e8f6b9a28 Mon Sep 17 00:00:00 2001 From: aMannus Date: Mon, 18 Jul 2022 11:08:35 +0200 Subject: [PATCH 08/30] Another batch of spooders --- .../Enhancements/randomizer/randomizer.cpp | 60 ++++++++++++++++++- .../actors/ovl_player_actor/z_player.c | 4 +- 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 2bdc7f505..1948c414c 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3018,6 +3018,18 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act } else { return RC_KAK_ANJU_AS_CHILD; } + case -28640: + return RC_KAK_GS_TREE; + case 20482: + return RC_KAK_GS_GUARDS_HOUSE; + case 20484: + return RC_KAK_GS_WATCHTOWER; + case 20496: + return RC_KAK_GS_SKULLTULA_HOUSE; + case 20488: + return RC_KAK_GS_HOUSE_UNDER_CONSTRUCTION; + case 20544: + return RC_KAK_GS_ABOVE_IMPAS_HOUSE; } break; case 83: @@ -3028,10 +3040,10 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_GRAVEYARD_DAMPE_GRAVEDIGGING_TOUR; case 14346: return RC_GY_GOSSIP_STONE; + case 28673: + return RC_GRAVEYARD_GS_BEAN_PATCH; case 20608: return RC_GRAVEYARD_GS_WALL; - //case 0: - //return RC_GRAVEYARD_GS_BEAN_PATCH; } break; case 84: @@ -3044,6 +3056,14 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_ZR_NEAR_GROTTOS_GOSSIP_STONE; case 14860: return RC_ZR_NEAR_DOMAIN_GOSSIP_STONE; + case -28414: + return RC_ZR_GS_TREE; + case 20737: + return RC_ZR_GS_LADDER; + case 20752: + return RC_ZR_GS_NEAR_RAISED_GROTTOS; + case 20744: + return RC_ZR_GS_ABOVE_BRIDGE; } break; case 85: @@ -3102,6 +3122,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_ZD_CHEST; case 14345: return RC_ZD_GOSSIP_STONE; + case 20800: + return RC_ZD_GS_FROZEN_WATERFALL; } break; case 89: @@ -3116,6 +3138,12 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act case 14849: case 14337: return RC_FAIRY_GOSSIP_STONE; + case 20740: + return RC_ZF_GS_ABOVE_THE_LOG; + case -28288: + return RC_ZF_GS_TREE; + case 20768: + return RC_ZF_GS_HIDDEN_CAVE; } break; case 90: @@ -3187,6 +3215,14 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_DMT_CHEST; case 14340: return RC_DMT_GOSSIP_STONE; + case 12036: + return RC_DMT_GS_NEAR_KAK; + case 28418: + return RC_DMT_GS_BEAN_PATCH; + case 20232: + return RC_DMT_GS_ABOVE_DODONGOS_CAVERN; + case 20240: + return RC_DMT_GS_FALLING_ROCKS_PATH; } break; case 97: @@ -3197,6 +3233,10 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_DMC_WALL_FREESTANDING_POH; case 14341: return RC_DMC_GOSSIP_STONE; + case -28800: + return RC_DMC_GS_CRATE; + case 28417: + return RC_DMC_GS_BEAN_PATCH; } break; case 98: @@ -3213,6 +3253,22 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act return RC_GC_MAZE_GOSSIP_STONE; case 14873: return RC_GC_MEDIGORON_GOSSIP_STONE; + case 12064: + return RC_GC_GS_CENTER_PLATFORM; + case -28864: + return RC_GC_GS_BOULDER_MAZE; + } + break; + case 99: + switch (actorParams) { + case 11012: + return RC_LLR_GS_HOUSE_WINDOW; + case -29944: + return RC_LLR_GS_TREE; + case 11010: + return RC_LLR_GS_RAIN_SHED; + case 11009: + return RC_LLR_GS_BACK_WALL; } break; } diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 6f4800a9f..59b7ade1a 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6081,7 +6081,7 @@ void func_8083DFE0(Player* this, f32* arg1, s16* arg2) { if (this->swordState == 0) { float maxSpeed = R_RUN_SPEED_LIMIT / 100.0f; if (CVar_GetS32("gMMBunnyHood", 0) != 0 && this->currentMask == PLAYER_MASK_BUNNY) { - maxSpeed *= 1.5f; + maxSpeed *= 3.0f; } this->linearVelocity = CLAMP(this->linearVelocity, -maxSpeed, maxSpeed); } @@ -7688,7 +7688,7 @@ void func_80842180(Player* this, GlobalContext* globalCtx) { if (!func_8083C484(this, &sp2C, &sp2A)) { if (CVar_GetS32("gMMBunnyHood", 0) != 0 && this->currentMask == PLAYER_MASK_BUNNY) { - sp2C *= 1.5f; + sp2C *= 3.0f; } func_8083DF68(this, sp2C, sp2A); func_8083DDC8(this, globalCtx); From 3a11aa08bb0c24055bffd875259a4f6442e0badc Mon Sep 17 00:00:00 2001 From: aMannus Date: Mon, 18 Jul 2022 23:55:44 +0200 Subject: [PATCH 09/30] Added v1 ice traps and fixed some tokens --- .../Enhancements/randomizer/randomizer.cpp | 2 ++ soh/src/code/z_message_PAL.c | 14 ++++++++++ soh/src/overlays/actors/ovl_En_Si/z_en_si.c | 28 +++++++++++++------ 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 1948c414c..2db510c17 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3018,6 +3018,8 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act } else { return RC_KAK_ANJU_AS_CHILD; } + } + switch (actorParams) { case -28640: return RC_KAK_GS_TREE; case 20482: diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 9cf592e4f..7f7733c79 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -1735,6 +1735,20 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) { } else { msgCtx->msgLength = font->msgLength = CopyGanonHintText(font->msgBuf, sizeof(font->msgBuf)); } + } else if (textId == 0xF8 && GET_PLAYER(globalCtx)->getItemId == GI_ICE_TRAP) { + switch (gSaveContext.language) { + case LANGUAGE_FRA: + strcpy(font->msgBuf, "\x08\x06\x50\x05\x43IDIOT\x0E\x20\x02"); + break; + case LANGUAGE_GER: + strcpy(font->msgBuf, "\x08\x06\x15 Du bist ein\x05\x43 DUMMKOPF\x05\x40!\x0E\x20\x02"); + break; + case LANGUAGE_ENG: + default: + strcpy(font->msgBuf, "\x08\x06\x30You are a\x05\x43 FOWL\x05\x40!\x0E\x20\x02"); + break; + } + msgCtx->msgLength = font->msgLength = strlen(font->msgBuf); } else { msgCtx->msgLength = font->msgLength; char* src = (uintptr_t)font->msgOffset; diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index 91fe0126c..db91b77a1 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -98,11 +98,17 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) { this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER; if (gSaveContext.n64ddFlag) { - getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); - textId = sGetItemTable[getItemId - 1].textId; - giveItemId = sGetItemTable[getItemId - 1].itemId; + if (getItemId == GI_ICE_TRAP) { + GiveItemWithoutActor(globalCtx, getItemId); + textId = 0xF8; + } else { + textId = sGetItemTable[getItemId - 1].textId; + giveItemId = sGetItemTable[getItemId - 1].itemId; + } + } + if (getItemId != GI_ICE_TRAP) { + Item_Give(globalCtx, giveItemId); } - Item_Give(globalCtx, giveItemId); if (CVar_GetS32("gSkulltulaFreeze", 0) != 1 || giveItemId != ITEM_SKULL_TOKEN) { player->actor.freezeTimer = 20; } @@ -127,11 +133,17 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { if (gSaveContext.n64ddFlag) { - getItemId = GetRandomizedItemId(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); - giveItemId = sGetItemTable[getItemId - 1].itemId; - textId = sGetItemTable[getItemId - 1].textId; + if (getItemId == GI_ICE_TRAP) { + GiveItemWithoutActor(globalCtx, getItemId); + textId = 0xF8; + } else { + textId = sGetItemTable[getItemId - 1].textId; + giveItemId = sGetItemTable[getItemId - 1].itemId; + } + } + if (getItemId != GI_ICE_TRAP) { + Item_Give(globalCtx, giveItemId); } - Item_Give(globalCtx, giveItemId); Message_StartTextbox(globalCtx, textId, NULL); Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); this->actionFunc = func_80AFB950; From 02d0b354a1de58b20c2482babad4af0a2bf7554f Mon Sep 17 00:00:00 2001 From: aMannus Date: Tue, 12 Jul 2022 17:21:14 +0200 Subject: [PATCH 10/30] Copied over files from old branch Dev merge made it so I couldn't easily merge into the old branch, so this is the next best thing. --- .../randomizer/3drando/settings.cpp | 136 +- .../randomizer/3drando/settings.hpp | 10 +- .../Enhancements/randomizer/randomizer.cpp | 1375 +++++------------ 3 files changed, 420 insertions(+), 1101 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.cpp b/soh/soh/Enhancements/randomizer/3drando/settings.cpp index 05fc10c4b..c68898b26 100644 --- a/soh/soh/Enhancements/randomizer/3drando/settings.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/settings.cpp @@ -52,19 +52,19 @@ namespace Settings { // Setting name, Options, Setting Descriptions (assigned in setting_descriptions.cpp) Category (default: Setting),Default index (default: 0), Default hidden (default: false) //Open Settings Any option index past the last description will use the last description Option RandomizeOpen = Option::Bool("Randomize Settings", {"No","Yes"}, {openRandomize}, OptionCategory::Toggle); - Option OpenForest = Option::U8 ("Forest", {"Closed", "Open", "Closed Deku"}, {forestClosed, forestOpen, forestClosedDeku}, OptionCategory::Setting, OPENFOREST_OPEN); + Option OpenForest = Option::U8 ("Forest", {"Closed", "Closed Deku", "Open"}, {forestClosed, forestClosedDeku, forestOpen}, OptionCategory::Setting, OPENFOREST_CLOSED); Option OpenKakariko = Option::U8 ("Kakariko Gate", {"Closed", "Open"}, {kakGateClosed, kakGateOpen}); - Option OpenDoorOfTime = Option::U8 ("Door of Time", {"Open", "Closed", "Intended"}, {doorOfTimeOpen, doorOfTimeClosed, doorOfTimeIntended}); - Option ZorasFountain = Option::U8 ("Zora's Fountain", {"Normal", "Adult", "Open"}, {fountainNormal, fountainAdult, fountainOpen}); + Option OpenDoorOfTime = Option::U8 ("Door of Time", {"Closed", "Song Only", "Open"}, {doorOfTimeIntended, doorOfTimeClosed, doorOfTimeOpen}); + Option ZorasFountain = Option::U8 ("Zora's Fountain", {"Closed", "Closed as child", "Open"}, {fountainNormal, fountainAdult, fountainOpen}); Option GerudoFortress = Option::U8 ("Gerudo Fortress", {"Normal", "Fast", "Open"}, {gerudoNormal, gerudoFast, gerudoOpen}); - Option Bridge = Option::U8 ("Rainbow Bridge", {"Open", "Vanilla", "Stones", "Medallions", "Rewards", "Dungeons", "Tokens"}, {bridgeOpen, bridgeVanilla, bridgeStones, bridgeMedallions, bridgeRewards, bridgeDungeons, bridgeTokens}, OptionCategory::Setting, RAINBOWBRIDGE_VANILLA); - Option BridgeStoneCount = Option::U8 (" Stone Count", {NumOpts(0, 3)}, {bridgeStoneCountDesc}, OptionCategory::Setting, 1, true); - Option BridgeMedallionCount= Option::U8 (" Medallion Count", {NumOpts(0, 6)}, {bridgeMedallionCountDesc}, OptionCategory::Setting, 1, true); - Option BridgeRewardCount = Option::U8 (" Reward Count", {NumOpts(0, 9)}, {bridgeRewardCountDesc}, OptionCategory::Setting, 1, true); - Option BridgeDungeonCount = Option::U8 (" Dungeon Count", {NumOpts(0, 8)}, {bridgeDungeonCountDesc}, OptionCategory::Setting, 1, true); - Option BridgeTokenCount = Option::U8 (" Token Count", {NumOpts(0, 100)}, {bridgeTokenCountDesc}, OptionCategory::Setting, 1, true); + Option Bridge = Option::U8 ("Rainbow Bridge", {"Vanilla", "Always open", "Stones", "Medallions", "Dungeon rewards", "Dungeons", "Tokens"}, {bridgeVanilla, bridgeOpen, bridgeStones, bridgeMedallions, bridgeRewards, bridgeDungeons, bridgeTokens}, OptionCategory::Setting, RAINBOWBRIDGE_VANILLA); + Option BridgeStoneCount = Option::U8 ("Stone Count", {NumOpts(0, 3)}, {bridgeStoneCountDesc}, OptionCategory::Setting, 1, true); + Option BridgeMedallionCount= Option::U8 ("Medallion Count", {NumOpts(0, 6)}, {bridgeMedallionCountDesc}, OptionCategory::Setting, 1, true); + Option BridgeRewardCount = Option::U8 ("Reward Count", {NumOpts(0, 9)}, {bridgeRewardCountDesc}, OptionCategory::Setting, 1, true); + Option BridgeDungeonCount = Option::U8 ("Dungeon Count", {NumOpts(0, 8)}, {bridgeDungeonCountDesc}, OptionCategory::Setting, 1, true); + Option BridgeTokenCount = Option::U8 ("Token Count", {NumOpts(0, 100)}, {bridgeTokenCountDesc}, OptionCategory::Setting, 1, true); Option RandomGanonsTrials = Option::Bool("Random Ganon's Trials", {"Off", "On"}, {randomGanonsTrialsDesc}, OptionCategory::Setting, ON); - Option GanonsTrialsCount = Option::U8 (" Trial Count", {NumOpts(0, 6)}, {ganonsTrialCountDesc}, OptionCategory::Setting, 1, true); + Option GanonsTrialsCount = Option::U8 ("Trial Count", {NumOpts(0, 6)}, {ganonsTrialCountDesc}, OptionCategory::Setting, 1, true); std::vector