Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Gohma setting and ER compatibility #1531

Open
wants to merge 1 commit into
base: Dev
Choose a base branch
from

Conversation

fenhl
Copy link
Collaborator

@fenhl fenhl commented Mar 12, 2022

Closed Forest has a logic quirk where forest escapes are out of logic prior to defeating Gohma. This PR adjust the gameplay to match: Items which enable trickless forest escapes (explosives, Din's Fire, scales, and warp songs other than Minuet) can no longer be placed in the forest area (which includes all of the green hint color region except for the Forest temple and Gohma's boss room). Similarly, at least one slingshot for each player is guaranteed inside the forest area in order to reduce the phenomenon where players get stuck in the forest for a long time waiting for a slingshot.

Since there is interest in playing with a closed forest without these restrictions, they are moved into a separate setting called “Closed Forest Requires Gohma”. This new setting is on by default, as it is intended for beginners, but Open Forest/Closed Deku turn it off.

Without the Require Gohma setting, Closed Forest can of course be compatible with almost every other setting. The exception is adult start, which runs into issues with itemless Temple of Time access unless some forms of ER are enabled; this restriction can be narrowed down further with #1827. This PR also makes Closed Forest with Require Gohma compatible with all remaining forms of ER by splitting entrances inside and outside the forest into separate pools if necessary. For example, if special interiors are shuffled, interiors from the forest remain in the forest and vice versa to prevent a forest escape via child spawn or the potion shop. If only simple interiors are shuffled, the existing behavior is preserved.

This PR is based on parts of #1305, but entering Kokiri Forest from the Lost Woods bridge is handled differently: Instead of adding a region representing the inside of the circle along which the Kokiri guard moves, this PR adjusts the position where Link spawns to ensure you're always outside the circle (thanks to @engineer124 for the contribution).

Some other implementation details to note:

  • The access expressions for Gohma's heart and dungeon reward are changed to re-use the clear event, removing some redundancy.
  • Glitched Logic previously disabled the Gohma requirement implicitly. It now follows the setting.

@r0bd0g
Copy link

r0bd0g commented Mar 13, 2022

I've had this tab open for a few days now and I've got to get clear of it, so I'm sorry for the rambling nature of this post.

Maybe those implicit deku nuts ought to be removed, just check for nuts or sling.

I'm not convinced that the glitched logic ow has been updated correctly?

You absolutely can end up inside the Kokiri circle on normal entrances -- you just have to walk into them slowly. It's very easy to do this unintentionally (one example is to roll into the loading zone and hit it on the slower frames of the roll). I don't think it's okay for this to ever happen in cases where it might be required to enter from this entrance, so I suggest somehow modifying how this exit works so that you never spawn inside the Kokiri, and this would allow the 1-way exits to be placed here as well. (Perhaps one way would be to always spawn in with the maximum walking speed?)

And another weird complication is that Zelda's Lullaby (or Letter, or doing the Impa check, or something, or I'm not sure if this behaviour still exists in rando) slightly moves the position of this guard, so you have to be careful to test how all of this works with both positions... You're going to have to ask around about the exact specifics of this and whether or not it still exists in rando. Regardless I suggest that this behaviour be removed, if it hasn't been already.

I think splitting this off from the closed forest setting might be too complicated for the intended purpose of being used by newer players. I would suggest that logically required Gohma should have to be turned off rather than turned on, to make things simpler for reaching the current behaviour, though I dunno how best to present that ("Closed Forest Doesn't Logically Require Gohma"? but this kind of enabling of a negative is generally discouraged). As well I wonder if it should just be in the closed forest dropdown, like, "closed forest -- logically requires gohma" and "closed forest - doesn't require gohma", b/c otherwise these two settings that only ever impact on each other will be too far apart in the GUI.

And as well I wonder if you shouldn't just separate closed forest and closed deku at this point and be able to enable both separately.

@fenhl
Copy link
Collaborator Author

fenhl commented Mar 13, 2022

Maybe those implicit deku nuts ought to be removed, just check for nuts or sling.

That's something only tangentially related to this feature and already handled in #1468 as far as I can tell, so I'm inclined to leave it as-is for now.

I'm not convinced that the glitched logic ow has been updated correctly?

It looks right to me but I admit I don't know enough about glitch logic to be sure. A more thorough review would be welcome.

You absolutely can end up inside the Kokiri circle on normal entrances -- you just have to walk into them slowly. It's very easy to do this unintentionally (one example is to roll into the loading zone and hit it on the slower frames of the roll). I don't think it's okay for this to ever happen in cases where it might be required to enter from this entrance, so I suggest somehow modifying how this exit works so that you never spawn inside the Kokiri, and this would allow the 1-way exits to be placed here as well. (Perhaps one way would be to always spawn in with the maximum walking speed?)

I was finally able to reproduce this after like 20 total minutes of attempts. It seems unrealistic that this would happen by accident, but I agree that modifying how the entrance works would be a better solution. @engineer124 I know you've been looking into entrance changes, do you think this would be doable?

And another weird complication is that Zelda's Lullaby (or Letter, or doing the Impa check, or something, or I'm not sure if this behaviour still exists in rando) slightly moves the position of this guard, so you have to be careful to test how all of this works with both positions... You're going to have to ask around about the exact specifics of this and whether or not it still exists in rando. Regardless I suggest that this behaviour be removed, if it hasn't been already.

If there is a difference in position, it is too small for me to notice. But I also couldn't find any code changing this in the randomizer, so I'm not sure what the status is here. Do you have screenshots showing the difference in the vanilla game?

I would suggest that logically required Gohma should have to be turned off rather than turned on

It already works this way: the setting is on by default.

As well I wonder if it should just be in the closed forest dropdown, like, "closed forest -- logically requires gohma" and "closed forest - doesn't require gohma", b/c otherwise these two settings that only ever impact on each other will be too far apart in the GUI.

I had considered that, but it removes the ability for disable relations to work correctly (since you can only disable entire settings, not specific options of settings). Moving the toggle right below the Open Forest setting would make sense though.

And as well I wonder if you shouldn't just separate closed forest and closed deku at this point and be able to enable both separately.

I am planning to PR that change separately, since it doesn't require this or vice versa, and both changes are somewhat controversial.

@fenhl
Copy link
Collaborator Author

fenhl commented Mar 14, 2022

Moving the toggle right below the Open Forest setting would make sense though.

Done.

@r0bd0g
Copy link

r0bd0g commented Mar 14, 2022

Glitched logic definitely seems wrong to me b/c I'm pretty sure 'is_glitched' was enough to leave before -- you can see it there in the can_leave_forest helper?

The difference in position of the guard between ZL and no ZL is definitely hard to notice, I'm not sure screenshots would really make that clear, but it's definitely there as I remember forest escape setups used to have to be adjusted after getting ZL.

I worry the setting being on by default might confuse people who are not playing with closed forest? But I haven't booted up this version to see how you've actually got the GUI behaving. Things like this enabled by default have caused confusion in the past (ex: gold scale water trick back in 3.0). I'm saying that I want this as default behaviour, but I'm not convinced I want to see that logical option checked off without clicking it myself (if without closed forest on it appears greyed out and checked on on the GUI in particular is really confusing -- people will wonder 'why can't I disable this setting?' but again I don't know what it actually looks like), but then the way that you would have to word a setting that worked that way where you have to enable it to disable the requirement would be confusing. So I don't know how I feel about this, however you might do it...... Can you make the option only appear when closed forest is selected?

@fenhl
Copy link
Collaborator Author

fenhl commented Mar 14, 2022

Glitched logic definitely seems wrong to me b/c I'm pretty sure 'is_glitched' was enough to leave before -- you can see it there in the can_leave_forest helper?

It seems that the intent is for the Gohma requirement to not be present in glitched logic at all. Since it's becoming an explicit toggle with this PR, it should affect glitched logic as well. I'll need to adjust the logic helper accordingly.

The difference in position of the guard between ZL and no ZL is definitely hard to notice, I'm not sure screenshots would really make that clear, but it's definitely there as I remember forest escape setups used to have to be adjusted after getting ZL.

If it's such a small difference, I'm not sure it needs to be accounted for. It seems to be very hard to get stuck in either case.

I'm not convinced I want to see that logical option checked off without clicking it myself (if without closed forest on it appears greyed out and checked on on the GUI in particular is really confusing -- people will wonder 'why can't I disable this setting?' but again I don't know what it actually looks like)

I can't test the GUI due to Node version conflicts, but the way it should be working right now is the toggle appears as turned off and grayed out with Open Forest or any of the other settings that conflict with it.

Can you make the option only appear when closed forest is selected?

That would be possible but I worry that this would be more confusing since it would also hide its tooltip, which explains the incompatibilities.

@fenhl
Copy link
Collaborator Author

fenhl commented Mar 14, 2022

I did some more testing and it seems that even with a warp song going to that entrance, it sometimes puts you inside the circle and sometimes outside. Not sure what's going on here.

@fenhl
Copy link
Collaborator Author

fenhl commented Mar 14, 2022

I think what's happening is that warp songs don't set Link's speed for the entrance animation, so the speed from the last time an entrance was used normally is applied.

@fenhl
Copy link
Collaborator Author

fenhl commented Mar 14, 2022

As pointed out by @dotzo, changing the speed for this entrance would remove a glitchless strat to enter the LW bridge entrance when it's found in decoupled. Combined with the fact that it's rather easy to break out into Kokiri Forest if you do end up inside the circle (a technique which I'd compare to rolling through a stunned skulltula, which is in base logic), and the additional effort that would be required to change the speed of the entrance, I'm inclined to leave the behavior as-is.

@r0bd0g
Copy link

r0bd0g commented Mar 14, 2022

"If it's such a small difference, I'm not sure it needs to be accounted for. It seems to be very hard to get stuck in either case."
It's something to keep in mind and make sure everything works the same either way. There's a weird lullaby interaction with Mido that was changed as well, so I figured for consistency you might want to also change this guy.

"I think what's happening is that warp songs don't set Link's speed for the entrance animation, so the speed from the last time an entrance was used normally is applied."
This sounds like a wider bug that ought to be fixed?

"changing the speed for this entrance would remove a glitchless strat to enter the LW bridge entrance when it's found in decoupled"
You didn't realize this before? I mean it's important any time you might want to return through that entrance. Decoupled, getting the item check if it's a loading zone that leads to a check (actually it leads to a pretty important check in vanilla), or perhaps stuff like resetting the heat timer in crater.

"Combined with the fact that it's rather easy to break out into Kokiri Forest if you do end up inside the circle (a technique which I'd compare to rolling through a stunned skulltula, which is in base logic)"
It's not so simple to get past him. You either have to make him fall out of bounds (which I would consider too glitch-adjacent to be something to require of players) or roll underneath him in a kind-of specific way, and it's easier said than done as you have to do it without accidentally talking to him.

"I'm inclined to leave the behavior as-is"
I pretty strongly disagree with leaving such such a jagged edge around for players to stumble into. This entrance was never intended to be used while the Kokiri is still there, so this is jank exclusive to glitched play and randomizer (and glitched play would just as easily forest escape right back through). Normally I like to keep things vanilla where possible, but I don't think this is a case where we can afford to do that, glitchless technique or no.

A possible compromise could be to continue to allow the slow-walk strat in settings where it cannot be required to enter Kokiri from that entrance. (Since glitched players can just glitch back through, and they'd be more likely to know what they're doing anyway, I think we can leave it alone there in all cases, though glitched logic does not currently support any of the settings where entering from this entrance is required. I'm not sure if there are other cases at the moment where glitched logic affects more than just the logic, however, so there might not be precedent to do that.) I think the minimum conflicting settings would be, first, all of this only applies with closed forest as child, and optionally only while the Kokiri is still there. (If closed forest requires Gohma becomes a more widely-applicable setting, it would also be safe to never apply the patch when that is enabled.) You would apply a patch to the entrance walking speed when coming in from that entrance when any of OW ER, spawn ER, or special interior ER is enabled. (Warp song ER and Owl Drop ER would not be logically relevant for forest access without any of those settings on, so you could allow spawns into the Kokiri's circle since you could just savewarp out and then walk the intended way to Kokiri, though if that makes it too likely to end up in the jank circle, optionally the patch could be applied to those cases anyway.)

@cjohnson57
Copy link
Collaborator

Notes from a discussion we had on the Discord:

  1. This PR making closed forest disabled in the GUI instead of silently disabling it in code is definitely better.

  2. A solution that prevented escape-able items from being placed in forest so logic can be normal instead of checking for closed forest would also be nice.

If these things were PRd separately they'd be accepted.

As it stands I still view this as a bandaid setting for the weirdness that is closed forest in rando.

@r0bd0g
Copy link

r0bd0g commented Aug 2, 2022

"A solution that prevented escape-able items from being placed in forest so logic can be normal instead of checking for closed forest would also be nice."
This would essentially create a series of checks that you know can't be bomb bag, scale, or a warp song (aside from non-warp shuffled minuet). It'd be better to keep the value of the checks balanced, so I don't think this is a good idea.

Songs in particular would be in an awkward spot, imagine songs on songs, what do you do about the starting song and the saria's check if it's skip child zelda? You may even find a shuffled composer grave. You're going to force all of those song checks not to have warp songs? What if you just plando a prelude start, what then, just allow forest escape b/c we removed the 'weird logic'?

(Let's say there's no available bomb bag, could you put a scale in a bomb-locked check? It's probably not a good idea to attempt that kind of thing during logic placement.)

So I don't think forcing areas not to have certain items like this is really doable, nor does it fully accomplish what you want to accomplish.

@fenhl
Copy link
Collaborator Author

fenhl commented Aug 2, 2022

Disabling in the GUI can't be PR'd separately because it relies on Require Gohma being its own setting. The GUI doesn't have functionality to only disable one option of a dropdown.

@cjohnson57
Copy link
Collaborator

Maybe do it the other way around then, closed forest disables the ER settings?

@r0bd0g
Copy link

r0bd0g commented Aug 3, 2022

I think simple interior is allowed per closed forest, but not special.

@fenhl
Copy link
Collaborator Author

fenhl commented Aug 3, 2022

Exactly. The problem remains the same there. Maybe after closed forest is made compatible with special interiors.

@r0bd0g
Copy link

r0bd0g commented Aug 20, 2022

Reminder I guess that at least one trick tooltip mentions closed forest, that possibly needs to be updated.

@ETR-BTF
Copy link

ETR-BTF commented Nov 7, 2022

One problem with banning items that can help you escape is that banning explosives will reduce the number of checks available (LW grottos, SFM grotto and Deku basement GS). One way of resolving this would be to open these grottos and the Deku wall from the start if Closed Forest is enabled. I'm not sure if that's a good or bad idea but I wanted to throw it out there regardless.

@fenhl
Copy link
Collaborator Author

fenhl commented Nov 7, 2022

I think for the sake of simplicity, the grottos should be left as is. A beginner rando player won't expect them to be open.

@r0bd0g
Copy link

r0bd0g commented Nov 7, 2022

Put a Kokiri in front of every exit. If you try to warp it's like "Mido says you can't warp right now."

@fenhl fenhl changed the title Make logically requiring Gohma in Closed Forest a setting Require Gohma setting and ER compatibility Mar 1, 2023
@fenhl
Copy link
Collaborator Author

fenhl commented Mar 1, 2023

Big update addressing item placement, ER compatibility, and the Pokey trap. See PR description for the current state.

@fenhl fenhl added the Type: Enhancement New feature or request label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Setting specific to setting(s) Status: Under Consideration Developers are considering whether to accept or decline the feature described Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants