From fd9fcd4f67dee80a1cf899b5bd62d65c4b2d8530 Mon Sep 17 00:00:00 2001 From: ThatHypedPerson Date: Mon, 28 Oct 2024 07:30:42 -0700 Subject: [PATCH 1/9] add starting consumables cuts out needing to go to a grotto to farm sticks and nuts --- src/init_save.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/init_save.c b/src/init_save.c index a5c7fab..87bb7a9 100644 --- a/src/init_save.c +++ b/src/init_save.c @@ -94,6 +94,12 @@ RECOMP_PATCH void Sram_InitDebugSave(void) { gSaveContext.save.hasTatl = true; + // start with basic consumables + gSaveContext.save.saveInfo.inventory.items[SLOT_DEKU_STICK] = ITEM_DEKU_STICK; + gSaveContext.save.saveInfo.inventory.ammo[SLOT_DEKU_STICK] = 10; + gSaveContext.save.saveInfo.inventory.items[SLOT_DEKU_NUT] = ITEM_DEKU_NUT; + gSaveContext.save.saveInfo.inventory.ammo[SLOT_DEKU_NUT] = 20; + gSaveContext.save.saveInfo.horseData.sceneId = SCENE_F01; gSaveContext.save.saveInfo.horseData.pos.x = -1420; gSaveContext.save.saveInfo.horseData.pos.y = 257; From ee8854fb0253767a0b208222e992c2999d2ee000 Mon Sep 17 00:00:00 2001 From: ThatHypedPerson Date: Mon, 28 Oct 2024 08:00:58 -0700 Subject: [PATCH 2/9] implement rudimentary chateau reuse currently readds chateau over bottle slot 1 if it was used last cycle, which may overwrite other contents (i.e. red potion) it would be preferable to add WEEKEVENTREG_DRANK_CHATEAU_ROMANI to sPersistentCycleWeekEventRegs so it wouldn't overwrite anything, but I couldn't find an elegant way to do that :P --- src/init_save.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/init_save.c b/src/init_save.c index 87bb7a9..22c2457 100644 --- a/src/init_save.c +++ b/src/init_save.c @@ -349,6 +349,11 @@ RECOMP_PATCH void Sram_SaveEndOfCycle(PlayState* play) { //Inventory_DeleteItem(ITEM_MASK_FIERCE_DEITY, SLOT(ITEM_MASK_FIERCE_DEITY)); } + // add chateau back into inventory if used this cycle + if (CHECK_WEEKEVENTREG(WEEKEVENTREG_DRANK_CHATEAU_ROMANI)) { + gSaveContext.save.saveInfo.inventory.items[SLOT_BOTTLE_1] = ITEM_CHATEAU; + } + for (i = 0; i < ARRAY_COUNT(sPersistentCycleWeekEventRegs); i++) { u16 isPersistentBits = sPersistentCycleWeekEventRegs[i]; From 70834169523b8bb21b816bba83a03a2e7e91c190 Mon Sep 17 00:00:00 2001 From: ThatHypedPerson Date: Mon, 28 Oct 2024 08:15:05 -0700 Subject: [PATCH 3/9] fill incoming wallets --- src/item_give.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/item_give.c b/src/item_give.c index 70e7b0b..9ccb5dd 100644 --- a/src/item_give.c +++ b/src/item_give.c @@ -1937,9 +1937,11 @@ u8 randoItemGive(u32 gi) { return ITEM_NONE; } else if (CUR_UPG_VALUE(UPG_WALLET) == 1) { Inventory_ChangeUpgrade(UPG_WALLET, 2); + Rupees_ChangeBy(500); return ITEM_NONE; } Inventory_ChangeUpgrade(UPG_WALLET, 1); + Rupees_ChangeBy(200); return ITEM_NONE; } else if (item == ITEM_DEKU_STICK_UPGRADE_20) { From b04a0a70735665570681bd00e3327444e3df8516 Mon Sep 17 00:00:00 2001 From: ThatHypedPerson Date: Mon, 28 Oct 2024 09:00:15 -0700 Subject: [PATCH 4/9] get both shooting gallery rewards on perfect --- src/shooting_gallery_hooks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shooting_gallery_hooks.c b/src/shooting_gallery_hooks.c index f884810..19b3999 100644 --- a/src/shooting_gallery_hooks.c +++ b/src/shooting_gallery_hooks.c @@ -127,6 +127,9 @@ RECOMP_PATCH void EnSyatekiMan_Town_SetupGiveReward(EnSyatekiMan* this, PlayStat Actor_OfferGetItem(&this->actor, play, GI_RUPEE_HUGE, 500.0f, 100.0f); } else { Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f); + if (!rando_location_is_checked(GI_QUIVER_40)) { + rando_send_location(GI_QUIVER_40); + } } } else { if (rando_location_is_checked(GI_QUIVER_40)) { From 17c0429b48252897a44fde2e7232f38783c1323b Mon Sep 17 00:00:00 2001 From: ThatHypedPerson Date: Mon, 28 Oct 2024 10:30:18 -0700 Subject: [PATCH 5/9] also start with full wallet --- src/init_save.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/init_save.c b/src/init_save.c index 22c2457..67bcf56 100644 --- a/src/init_save.c +++ b/src/init_save.c @@ -95,6 +95,7 @@ RECOMP_PATCH void Sram_InitDebugSave(void) { gSaveContext.save.hasTatl = true; // start with basic consumables + gSaveContext.save.saveInfo.playerData.rupees = 99; gSaveContext.save.saveInfo.inventory.items[SLOT_DEKU_STICK] = ITEM_DEKU_STICK; gSaveContext.save.saveInfo.inventory.ammo[SLOT_DEKU_STICK] = 10; gSaveContext.save.saveInfo.inventory.items[SLOT_DEKU_NUT] = ITEM_DEKU_NUT; From c4e19c153649788fb234cf7d3c57ed4b37bb29f7 Mon Sep 17 00:00:00 2001 From: ThatHypedPerson Date: Mon, 28 Oct 2024 12:20:46 -0700 Subject: [PATCH 6/9] auto invert SoT + keep inverted state between cycles --- src/init_save.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/init_save.c b/src/init_save.c index 67bcf56..e946c96 100644 --- a/src/init_save.c +++ b/src/init_save.c @@ -101,6 +101,8 @@ RECOMP_PATCH void Sram_InitDebugSave(void) { gSaveContext.save.saveInfo.inventory.items[SLOT_DEKU_NUT] = ITEM_DEKU_NUT; gSaveContext.save.saveInfo.inventory.ammo[SLOT_DEKU_NUT] = 20; + gSaveContext.save.timeSpeedOffset = -2; + gSaveContext.save.saveInfo.horseData.sceneId = SCENE_F01; gSaveContext.save.saveInfo.horseData.pos.x = -1420; gSaveContext.save.saveInfo.horseData.pos.y = 257; @@ -301,7 +303,7 @@ RECOMP_PATCH void Sram_SaveEndOfCycle(PlayState* play) { s32 i; u8 item; - gSaveContext.save.timeSpeedOffset = 0; + // gSaveContext.save.timeSpeedOffset = 0; gSaveContext.save.eventDayCount = 0; gSaveContext.save.day = 0; gSaveContext.save.time = CLOCK_TIME(6, 0) - 1; From 460ee0f0244ff2afe4f4c28ea03ed3e494b6d5f3 Mon Sep 17 00:00:00 2001 From: ThatHypedPerson Date: Tue, 5 Nov 2024 11:23:31 -0800 Subject: [PATCH 7/9] Remove Temp Shooting Gallery Reward prepping to merge from upstream --- src/shooting_gallery_hooks.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/shooting_gallery_hooks.c b/src/shooting_gallery_hooks.c index 19b3999..f884810 100644 --- a/src/shooting_gallery_hooks.c +++ b/src/shooting_gallery_hooks.c @@ -127,9 +127,6 @@ RECOMP_PATCH void EnSyatekiMan_Town_SetupGiveReward(EnSyatekiMan* this, PlayStat Actor_OfferGetItem(&this->actor, play, GI_RUPEE_HUGE, 500.0f, 100.0f); } else { Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 500.0f, 100.0f); - if (!rando_location_is_checked(GI_QUIVER_40)) { - rando_send_location(GI_QUIVER_40); - } } } else { if (rando_location_is_checked(GI_QUIVER_40)) { From 2f0b31079888e15d5f35a76e0ed18389e0c4b447 Mon Sep 17 00:00:00 2001 From: ThatHypedPerson Date: Tue, 5 Nov 2024 11:44:36 -0800 Subject: [PATCH 8/9] Implement Better Persistent Chateau Romani --- src/init_save.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/init_save.c b/src/init_save.c index e946c96..7cdc588 100644 --- a/src/init_save.c +++ b/src/init_save.c @@ -22,6 +22,8 @@ void Sram_ClearHighscores(void); void Sram_GenerateRandomSaveFields(void); void Sram_ResetSave(void); +bool drankChateau = false; + void Sram_SetInitialWeekEvents(void) { SET_WEEKEVENTREG(WEEKEVENTREG_15_20); SET_WEEKEVENTREG(WEEKEVENTREG_59_04); @@ -79,6 +81,12 @@ void Sram_SetInitialWeekEvents(void) { // skip the princess prison cutscene SET_WEEKEVENTREG(WEEKEVENTREG_ENTERED_WOODFALL_TEMPLE_PRISON); + + // restore chateau romani state after cycle reset + if(drankChateau) { + SET_WEEKEVENTREG(WEEKEVENTREG_DRANK_CHATEAU_ROMANI); + drankChateau = false; + } } RECOMP_PATCH void Sram_InitDebugSave(void) { @@ -352,10 +360,8 @@ RECOMP_PATCH void Sram_SaveEndOfCycle(PlayState* play) { //Inventory_DeleteItem(ITEM_MASK_FIERCE_DEITY, SLOT(ITEM_MASK_FIERCE_DEITY)); } - // add chateau back into inventory if used this cycle - if (CHECK_WEEKEVENTREG(WEEKEVENTREG_DRANK_CHATEAU_ROMANI)) { - gSaveContext.save.saveInfo.inventory.items[SLOT_BOTTLE_1] = ITEM_CHATEAU; - } + // persistent chateau romani state + drankChateau = CHECK_WEEKEVENTREG(WEEKEVENTREG_DRANK_CHATEAU_ROMANI); for (i = 0; i < ARRAY_COUNT(sPersistentCycleWeekEventRegs); i++) { u16 isPersistentBits = sPersistentCycleWeekEventRegs[i]; From 8d0cbf6517cd2aacafcf231c439e6ff9e24c900c Mon Sep 17 00:00:00 2001 From: ThatHypedPerson Date: Tue, 12 Nov 2024 15:16:26 -0800 Subject: [PATCH 9/9] Add Sun's Song and Notes for Future Changes --- src/init_save.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/init_save.c b/src/init_save.c index 7cdc588..b284675 100644 --- a/src/init_save.c +++ b/src/init_save.c @@ -102,6 +102,7 @@ RECOMP_PATCH void Sram_InitDebugSave(void) { gSaveContext.save.hasTatl = true; + // TODO: move below to YAML options // start with basic consumables gSaveContext.save.saveInfo.playerData.rupees = 99; gSaveContext.save.saveInfo.inventory.items[SLOT_DEKU_STICK] = ITEM_DEKU_STICK; @@ -111,6 +112,9 @@ RECOMP_PATCH void Sram_InitDebugSave(void) { gSaveContext.save.timeSpeedOffset = -2; + // TODO: hide song on quest screen + add playback text + SET_QUEST_ITEM(ITEM_SONG_SUN + QUEST_SONG_SUN); + gSaveContext.save.saveInfo.horseData.sceneId = SCENE_F01; gSaveContext.save.saveInfo.horseData.pos.x = -1420; gSaveContext.save.saveInfo.horseData.pos.y = 257;