Skip to content

[WIP] Implement gSkipCutscenes option#2824

Closed
garrettjoecox wants to merge 2 commits intoHarbourMasters:developfrom
garrettjoecox:gSkipCutscenes
Closed

[WIP] Implement gSkipCutscenes option#2824
garrettjoecox wants to merge 2 commits intoHarbourMasters:developfrom
garrettjoecox:gSkipCutscenes

Conversation

@garrettjoecox
Copy link
Contributor

@garrettjoecox garrettjoecox commented May 3, 2023

This is an effort to split out a lot of the speedups we have behind the n64ddFlag (randomizer) flag, so that people on vanilla play-throughs may also benefit from them.

Blocked by #3016, only most recent commit is relevant

This branch will probably be WIP for a bit while I/we hunt down remaining speedups, feel free to comment on this PR if you find any additional ones that aren't listed below.

Enable in Enhancements > Gameplay > Time Savers
Screenshot 2023-05-03 at 11 09 09 AM

* = Required on rando

TODO:

  • All option
  • Individual Options
  • [annoyance] Shiek in your face first time going adult
  • Skipped cutscenes should still set the time
  • Compatibility with randomizer (just need to verify everything works)
  • Compatibility with entrance randomizer
  • Entrance Cutscenes
    • Forest Temple entrance optional
    • Fire temple darunia optional
  • Entrance title cards
  • Boss introductions
  • Quick boss deaths
    • Phantom Ganon
    • Nabooru
    • Twinrova
    • Ganondorf
  • Learn Song *
    • Zelda's Lullaby
    • Epona's Song
    • Saria's Song
    • Sun's Song
    • Song of Time
    • Song of Storms
    • Minuet
    • Bolero
    • Serenade
    • Requiem
    • Nocturne
    • Prelude
  • Intro cutscene
  • Story cutscenes
    • Lost woods bridge *
    • Zelda in courtyard
    • Zelda Escape
    • First time pulling sword *
    • Nabooru captured (On open silver gauntlets chest)
    • Drain Well
    • LACS *
    • Ganon Castle Collapse
  • Dungeon Completion *
    • Deku Tree
    • Dodongo's Cavern
    • Jabu Jabu's Belly
    • Forest Temple
    • Fire Temple
    • Water Temple
    • Spirit Temple
    • Shadow Temple
  • Fairy Fountains *
  • Owl
  • Misc Speedups
    • Seed pouch upgrade in lost woods
    • Time Travel
    • Opening Jabu Jabu
    • Deku Scrub Theater *
    • Forest Temple Purple Poe Fight
    • Goron crying in Gc as adult
    • Shadow temple lens hints
    • Door of time cutscene
    • Darunia's Joy
    • Rainbow bridge
    • Opening royal tomb in graveyard
  • Ganon trials

Build Artifacts

@garrettjoecox garrettjoecox added the do not merge Not ready or not valid changes label May 3, 2023
@garrettjoecox
Copy link
Contributor Author

@Archez this might break entrance rando in a few spots because of how I've simplified some of the logic, but my focus right now is vanilla. I'll ping you when I'm closer to wrapping to see if I can work out how this can work with entrances.

@Archez
Copy link
Contributor

Archez commented May 3, 2023

I believe getting Silver Gauntlets also triggers the Nabooru captured cutscene.

@stratomaster64
Copy link
Contributor

Prelude happens specifically when you enter room 1 of ToT after having the forest medallion.

@inspectredc
Copy link
Member

Prelude happens specifically when you enter room 1 of ToT after having the forest medallion.

Note this is true for rando but vanilla it requires beating forest temple itself ('used forest temple blue warp' flag)

For serenade also the vanilla requirement is just having iron boots and being in that room but since theres no other way of obtaining iron boots should be fine regardless

@garrettjoecox
Copy link
Contributor Author

garrettjoecox commented May 3, 2023

[bug] Upon finishing deku tree, a kokiri still blocks your path out of the forest until your scene reloads (eg: enter and exit the shop)
[bug] Malon just says "my mother composed this song..." outside of castle, no egg given

@garrettjoecox
Copy link
Contributor Author

Prelude happens specifically when you enter room 1 of ToT after having the forest medallion.

Note this is true for rando but vanilla it requires beating forest temple itself ('used forest temple blue warp' flag)

For serenade also the vanilla requirement is just having iron boots and being in that room but since theres no other way of obtaining iron boots should be fine regardless

This is good to know, I'm not aiming for rando parity here but rather vanilla. 👍

@jbodner09
Copy link
Contributor

jbodner09 commented May 4, 2023

As I mentioned in #849, it might be nice to break this out into a few different categories like GZ does, since we already have a few vanilla cutscene skips implemented with separate options, like the fast warp songs and fast chests. In fact, it might be worth removing all those existing options from where they are in the UI, and making them appear underneath this new checkbox when it's turned on (as well as any other categories we want to break this into). That way, turning on the checkbox will turn on all the sub-categories by default, and people can turn off specific ones as they desire (like, if they want the main story cutscenes but want fast everything else).

@garrettjoecox
Copy link
Contributor Author

For some reason, kak gate is open before showing guard the letter. None of the flags set on file creation look like they should cause this…

@garrettjoecox
Copy link
Contributor Author

Looks like the gate checks for EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL (0x45) in vanilla. TIL.

@garrettjoecox garrettjoecox force-pushed the gSkipCutscenes branch 2 times, most recently from 7ac235a to 0e7dd52 Compare May 7, 2023 06:11
@garrettjoecox garrettjoecox force-pushed the gSkipCutscenes branch 3 times, most recently from 318045b to ad719ee Compare June 5, 2023 14:43
@garrettjoecox garrettjoecox added this to the MacReady milestone Jun 13, 2023
@garrettjoecox garrettjoecox mentioned this pull request Jun 17, 2023
7 tasks
@garrettjoecox
Copy link
Contributor Author

@briaguya-ai would you be opposed to me removing the randomizer check from the cutscene skips/speedups that aren't actually tied to randomizer in any way, and just adding the appropriate cutscene skip options to the randomizer preset?

@briaguya0
Copy link
Contributor

@briaguya-ai would you be opposed to me removing the randomizer check from the cutscene skips/speedups that aren't actually tied to randomizer in any way, and just adding the appropriate cutscene skip options to the randomizer preset?

my only concern there would be anything in rando that breaks when cutscenes aren't skipped. i know there are plenty of players that don't use presets, and making them use the rando preset feels bad to me. i think an ideal solution would be to make a wrapper/helper method for ShouldSkipCutscene or something that returns rando || cvar or something for now so we don't break anything, and then iterate on that

@garrettjoecox
Copy link
Contributor Author

my only concern there would be anything in rando that breaks when cutscenes aren't skipped.

Yea, I have a general idea of what those are, they are marked with *'s in the description and would remain force skipped in rando for sure.

i know there are plenty of players that don't use presets, and making them use the rando preset feels bad to me.

To be fair, there will still be a single "skip all" checkbox, so it won't be too much effort to use without using the preset.

i think an ideal solution would be to make a wrapper/helper method for ShouldSkipCutscene or something that returns rando || cvar or something for now so we don't break anything, and then iterate on that

I think this might be the direction I have to take regardless in terms of splitting each of the categories up. So for now I will just leave the rando requirement but I think people should have the option to not skip everything in rando at some point in the future

@briaguya0
Copy link
Contributor

briaguya0 commented Jun 20, 2023

I think people should have the option to not skip everything in rando at some point in the future

I completely agree! I'm just mostly thinking about it from a "let's make sure we don't break rando, and we have one place to look when adding the ability to not skip stuff"

I also feel like we should default to skipping cutscenes in rando, and the UX for that with cvars is less than ideal at the moment

@nick-michael
Copy link
Contributor

FYI I was doing some testing using a combination of this branch and your rando-changes branch - there seems to be an issue at least with receiving song of time.

After I get the Ocarina it does the cutscene skip but I don't receive SoT. Honestly I don't really know what I'm doing in this code but I was able to fix it by changing the flag to use what was there originally:
0x1F, FLAG_SCENE_TREASURE,
(based on https://github.com/HarbourMasters/Shipwright/pull/2824/files#diff-0e1af46a802419a1a7082c34a85462b3ce115e18ebf8a2e4e79be86ac15c4f90L225)

And then adding some additional logic in RegisterItemGiver to handle FLAG_SCENE_TREASURE:

        for (auto& itemGiverEntry : itemGiverEntries) {
            if (itemGiverEntry.hasRecievedFlagType == FLAG_SCENE_TREASURE) {
                if (
                    Flags_Get(itemGiverEntry.shouldRecieveFlagType, itemGiverEntry.shouldRecieveFlag) &&
                    !Flags_GetTreasure(gPlayState, itemGiverEntry.hasRecievedFlag)
                    && gSaveContext.nextTransitionType == 0xFF
                ) {
                    GetItemEntry getItemEntry = gSaveContext.n64ddFlag ? 
                        Randomizer_GetItemFromKnownCheck(itemGiverEntry.randomizerCheck, static_cast<GetItemID>(itemGiverEntry.vanillaItemID)) : 
                        ItemTable_RetrieveEntry(itemGiverEntry.modIndex, itemGiverEntry.vanillaItemID);

                    if (GiveItemEntryWithoutActor(gPlayState, getItemEntry)) {
                        player->pendingFlag.flagType = itemGiverEntry.hasRecievedFlagType;
                        player->pendingFlag.flagID = itemGiverEntry.hasRecievedFlag;
                    }
                    if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
                        // Allow the player to receive the item while swimming
                        player->stateFlags2 |= PLAYER_STATE2_UNDERWATER;
                        func_8083E5A8(player, gPlayState);
                    }
                }
            }
            else if (
                ...continue as before

I'm not really sure why this fix works and the original code doesn't, it seems to be something to do with the fact that there's almost a second "cutscene" in between getting the ocarina and receiving the song of time. I tried leaving the flags as is and adding a check for nextTransitionType == 0xFF into the existing if statement but that still doesn't work. I'm wondering if this would be an issue for all of the FLAG_SCENE_TREASURE flag rewards or if this is a special case.

Here's a video anyway:

2023-07-20.12-38-42.mp4

@garrettjoecox
Copy link
Contributor Author

Closing, this will be succeeded by an upcoming PR targetting develop-rando

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Not ready or not valid changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants