Skip to content

Boss room shuffle #1468

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

Merged
merged 15 commits into from
Apr 11, 2022
Merged

Conversation

dewiniaid
Copy link

@dewiniaid dewiniaid commented Dec 20, 2021

This is a fork of my existing boss-shuffle branch, but rebased to be against Dev instead of Dev-R. This is unfinished, but mostly working.

Working:

  • Dungeon boss rooms can be swapped between dungeons (e.g. walking through the Fire Temple boss door can put you in King Dodongo's room)
  • Glitchless logic is adjusted to account for separation of reaching a boss room vs. defeating the boss. Boss shuffle is currently unsupported in glitched logic.
  • Save/quit and dying from a shuffled boss room will correctly put you at the correct dungeon (If Barinade is in Deku Tree, save/quit from Barinade will put you in Deku Tree). This includes weird fixes for Gohma (courtesy of @rattus128)
  • Medallion rewards are correctly distributed. (If Fire Temple is Water Medallion, this is true regardless of which boss is at Fire Temple)
  • Altar hints and the Start+A menu reflect correct medallion locations
  • Relocated boss rooms should be counted as part of their new dungeon for all relevant purposes (such as hints)
  • Exiting a boss room (possible with Gohma and King Dodongo) takes you to the correct location - except in Water Temple (see Known Issues, below)

Known Issues:

  • MQ logic is only lightly tested. (Courtesy of RSL runners running the Roman's variant of this fork).
  • Glitch logic doesn't exist yet, so this feature is simply unavailable in glitch logic seeds. Dusk has expressed interest in handling glitch logic in their Glitch logic 2.0 update if this is accepted in time.
  • Exiting the Water Temple boss room puts you at the beginning of Water Temple rather than outside the boss room. Unlike all other dungeons, Water Temple lacks an appropriate second entrance point at the boss door; we'd need a way to patch in another entrance to Water Temple to fix this correctly; this is outside my skillset. @engineer124 had been working on a way to patch in a corrected entrance location, but the current workaround is sufficient for testing.

@dewiniaid dewiniaid changed the title Feature/boss shuffle vs official Boss room shuffle Dec 20, 2021
@r0bd0g
Copy link

r0bd0g commented Dec 20, 2021

I think closed forest could be made to work with boss shuffle. You'd only need to change which boss you need to beat to affect the state of the forest. But there's actually a bit of a wider question here. For example, does beating Phantom Ganon make it so adult Kokiri Forest is no longer infested by monsters? Or is it beating the boss of the Forest Temple that does that? I'm pretty sure that currently it's the boss and not the dungeon that matters for setting these kinds of flags. We kind of had to answer a similar question before when we added dungeon ER: Is it beating Forest Temple/Phantom Ganon? Or is it beating whatever dungeon is inside the Forest Temple entrance? We decided the flags would still be tied to the original dungeon rather than the new dungeon inside that entrance. Most dungeons have these kinds of flags, the most notable being the raising of the water in the lake (though that's set during the cutscene and not on stepping into the blue warp), and so to change this to make it so the dungeon is what matters and not the boss would require moving a lot of flags around. But in this case I kind of feel like it should be the dungeon that matters for setting the flags, not the boss, but it would be a lot of work, so maybe it's not worth it. And maybe you disagree anyway.

Because the boss rooms do not differ between vanilla and MQ, I suggest moving them to Overworld.py (as was done with Ganon's Tower).

Gohma can be pretty easily brought off the ceiling with Boomerang, so it's weird there isn't a trick for that. The new trick for fighting as adult without Nuts should have the 'Entrance' tag. Except honestly I'm not sure we need this trick at all. Deku Nuts are so easy to come by that I don't believe we should ever bother having a trick to skip a logical requirement for them. I'd suggest cutting the trick. You can also fight Barinade without sword or sticks, using the pots around the edge of the room. Sticks are not quite as common as nuts, but again I don't think we should add a trick just for this. On the other hand, it is possible to fight Morpha without a Hookshot. As child even. And this does seem like a pretty significant skip, but I'd have to go in and see how it plays before adding it. Bongo can also be fought without any projectile at all, and it's not even that difficult. You don't need to worry about adding a trick for this though b/c the dungeon shortcuts PR has already implemented it.

The dungeon logic has some mistakes. I'll point out two with first file on the list, MQ Deku: You added bow as an alternative to burn the webs down to the boss, but that trick isn't possible in MQ. You also removed here() from around has_shield for the basement scrubs, which means the age that you don't intend to fight the boss could no longer be expected use his shield to open the way. I'm not going to review this logic further because I think merging with the dungeon shortcuts PR will require too many changes to make a full review worth doing at this time.

If you're thinking of changing the logic to support coming in from the boss rooms as part of some decoupled boss room ER, I suggest not yet making these changes as you'll increase the chance of introducing errors. (I noticed some changes to vanilla Deku that seemed geared toward this kind of change, when, in the absence of decoupled, much simpler changes would likely have sufficed.) Before even Roman fork could support this feature, we have to solve a conundrum with how to handle the logic for Spirit Temple. Child Link could jump down from the boss room area onto the left hand of the interior statue, and from there reach locked doors he was never expected to be able to reach (thus far we've been ignoring 'crazy dance'), which breaks a lot of assumptions about how the key logic for both Spirit Temples work. A scheme to work around that problem should be devised before worrying about the logic.

@dewiniaid
Copy link
Author

dewiniaid commented Dec 20, 2021

I think closed forest could be made to work with boss shuffle. You'd only need to change which boss you need to beat to affect the state of the forest. But there's actually a bit of a wider question here. For example, does beating Phantom Ganon make it so adult Kokiri Forest is no longer infested by monsters? Or is it beating the boss of the Forest Temple that does that? I'm pretty sure that currently it's the boss and not the dungeon that matters for setting these kinds of flags.

And now I'm reminded why I disabled closed forest: because I don't know how to change things around to the correct boss kill flag. So, as it currently stands: killing Phantom Ganon removes the enemies in Adult KF, killing Gohma is required to satisfy the flags for Closed Forest (so it's converted to Closed Deku instead.)

I was also advised that there was already a lot of things that Closed Forest doesn't play nicely with (and Boss Shuffle really shines in conjunction with one of those -- Dungeon Shuffle), so it wasn't a huge consideration at the time

That said, as an alternative solution (i.e. unless I get some support by someone able to do the appropriate ROM patching), we could also just require Gohma be at Deku Tree if Closed Forest is on.

We kind of had to answer a similar question before when we added dungeon ER: Is it beating Forest Temple/Phantom Ganon? Or is it beating whatever dungeon is inside the Forest Temple entrance? We decided the flags would still be tied to the original dungeon rather than the new dungeon inside that entrance. Most dungeons have these kinds of flags, the most notable being the raising of the water in the lake (though that's set during the cutscene and not on stepping into the blue warp), and so to change this to make it so the dungeon is what matters and not the boss would require moving a lot of flags around. But in this case I kind of feel like it should be the dungeon that matters for setting the flags, not the boss, but it would be a lot of work, so maybe it's not worth it. And maybe you disagree anyway.

In a perfect world, I'd like the cutscene triggers and flags to be tied to the dungeon and not the boss -- but this is currently beyond my abilities. PRs welcome ;)

Because the boss rooms do not differ between vanilla and MQ, I suggest moving them to Overworld.py (as was done with Ganon's Tower).

(Assuming you mean Overworld.json) I was considering doing something like this, so I'd be in favor of that. It was tedious fixing logic in two places every time as things got revised.

Gohma can be pretty easily brought off the ceiling with Boomerang, so it's weird there isn't a trick for that. The new trick for fighting as adult without Nuts should have the 'Entrance' tag. Except honestly I'm not sure we need this trick at all. Deku Nuts are so easy to come by that I don't believe we should ever bother having a trick to skip a logical requirement for them. I'd suggest cutting the trick.

I was unable to get Gohma down with a boomerang, but I'm bad at this game and multiple people have said it's easy -- I'll fold it into the trick. Multiple people assured me it is possible in some bizarre combinations of ER to get a seed where nuts may not be accessible until post-Gohma. I'm of the mind to keep it as a trick for now because it's much easier to remove a trick later (i.e. when this is actually ready for merge) than it is to add it, and it's a lot easier to discuss the possibility when the trick is clearly documented.

You can also fight Barinade without sword or sticks, using the pots around the edge of the room. Sticks are not quite as common as nuts, but again I don't think we should add a trick just for this.

There's precedent for refusing 'hard' things like this from logic -- Ice Cavern Frezzards aren't considered killable with sticks because it takes 8 of them without broken stick glitch. I was previously advised to add the weapon requirements for Barinade. Are you suggesting they be removed (and killing Barinade with pots be base logic?), or are you just making me aware of the possibility without suggesting a logic change here?

On the other hand, it is possible to fight Morpha without a Hookshot. As child even. And this does seem like a pretty significant skip, but I'd have to go in and see how it plays before adding it. Bongo can also be fought without any projectile at all, and it's not even that difficult. You don't need to worry about adding a trick for this though b/c the dungeon shortcuts PR has already implemented it.

Hookshotless Morpha was a trick I was considering adding. Should Projectileless Bongo be a trick or base logic?

The dungeon logic has some mistakes. I'll point out two with first file on the list, MQ Deku: You added bow as an alternative to burn the webs down to the boss, but that trick isn't possible in MQ. You also removed here() from around has_shield for the basement scrubs, which means the age that you don't intend to fight the boss could no longer be expected use his shield to open the way. I'm not going to review this logic further because I think merging with the dungeon shortcuts PR will require too many changes to make a full review worth doing at this time.

MQ logic is definitely known to be shaky, I've been trying to find people to help me sort it out but haven't gotten any solid bites. I've fixed the Deku logic as indicated.

If you're thinking of changing the logic to support coming in from the boss rooms as part of some decoupled boss room ER, I suggest not yet making these changes as you'll increase the chance of introducing errors. (I noticed some changes to vanilla Deku that seemed geared toward this kind of change, when, in the absence of decoupled, much simpler changes would likely have sufficed.) [...]

Decoupled boss entrances are not planned, but the connections need to exist for boss shuffle to be able to fix them up. This is because e.g. King Dodongo's room can be walked back out of, and it might be placed in Fire Temple which means the Volvagia Boss Room -> Fire Temple Lower connection must exist so it can be replaced.

Boss entrances with mixed pools is a possible consideration, but I'm explicitly ignoring that possibility until this reaches a stable point and is merged. That'd need a lot of other considerations (like altar hints and the medallions shown in the menu.) The Roman's flavor of this PR already has mixed/decoupled accounted for in its logic -- in short, boss shuffle is excluded from the mixed pools and from being decoupled (though the reversed entrances still show in the spoiler log and I haven't found a way to suppress them yet. That is irrelevant for a merge against Dev branch though.)

@r0bd0g
Copy link

r0bd0g commented Dec 20, 2021

Yes, overworld.json.
Sometimes people are confused why Ganon's Tower is in that file. It'd be annoying to do but I wonder if some people might appreciate a bossrooms.json (which would also include tower) just to reduce the confusion there a little bit.

"I was unable to get Gohma down with a boomerang"
IIRC you just need to target her as she climbs, you'll stay locked on while she's on the ceiling as long as you stay close, but it's been a while since the last time I've done this.

Everything in that paragraph about the bosses was all about things that are possible or could be made tricks; nothing was something I was suggesting for base logic. I kind of felt Bongo with no projectile was very close to reasonable for base logic, but the current dungeon shortcuts PR is implementing it as a trick. Once that's merged, I suppose you will have to update the tooltip for that trick b/c there will be a new setting under which it could be relevant.

"but the connections need to exist for boss shuffle to be able to fix them up"
I just mean, you put the entrance there, but you don't actually need anything there logically for when you come back through. It just kind of looked like your vanilla Deku had been changed with the intention that you might come in through that boss entrance, idk.

@dewiniaid
Copy link
Author

dewiniaid commented Dec 20, 2021

Yes, overworld.json. Sometimes people are confused why Ganon's Tower is in that file. It'd be annoying to do but I wonder if some people might appreciate a bossrooms.json (which would also include tower) just to reduce the confusion there a little bit.

I had actually considered a Bosses.json, and it wouldn't be too hard to add -- it'd just be a duplication of the existing code that loads Overworld.json. It does mean one more later-required-fix for glitch logic though, unless we ship an empty Glitched World/Bosses.json for now as a placeholder. But for now, it's moved into Overworld.json

[...]

Everything in that paragraph about the bosses was all about things that are possible or could be made tricks; nothing was something I was suggesting for base logic. I kind of felt Bongo with no projectile was very close to reasonable for base logic, but the current dungeon shortcuts PR is implementing it as a trick. Once that's merged, I suppose you will have to update the tooltip for that trick b/c there will be a new setting under which it could be relevant.

I think I had mentioned on Discord earlier that it was tempting to cherry-pick the shortcuts PR for that trick specifically. Since it's already been discussed and decided to be a trick there, that's the approach that should go here too.

"but the connections need to exist for boss shuffle to be able to fix them up" I just mean, you put the entrance there, but you don't actually need anything there logically for when you come back through. It just kind of looked like your vanilla Deku had been changed with the intention that you might come in through that boss entrance, idk.

Vanilla Deku was changed because both ends of a connection need to match between Normal and MQ for ER. Previously, Gohma was off of Deku Tree Lobby in normal, but Deku Tree Basement Ledge in MQ. Now it's off Deku Tree Basement Ledge in both cases. There weren't any intended logic changes other than an attempt at fixing up connections so the logic made actual sense rather than have regions that don't connect (looking at you "Water Temple Highest Water Level", which is more an event than a location)

@dewiniaid
Copy link
Author

Since dungeon shortcuts are the big conflict with logic changes, I've preemptively made a fork that combines shortcuts + boss shuffle. Said fork should cleanly apply to latest Dev after shortcuts gets merged. If that has any obvious issues, I'll fix them in all relevant branches.

Logic in that branch can be reviewed at https://github.com/dewiniaid/OoT-Randomizer/tree/feature/boss-shuffle-vs-shortcuts

A direct link to a diff between that branch and boss shuffle can be found at mracsys/OoT-Randomizer@dungeon-shortcuts...dewiniaid:feature/boss-shuffle-vs-shortcuts . Note the diff is fairly large since it also includes 60 commits in Dev that aren't in dungeon-shortcuts, but skipping to the files in data/World should be sufficient for checking logic.

@r0bd0g
Copy link

r0bd0g commented Jan 17, 2022

Why is there a comment that says "Set Dungeon Reward Actor in Jabu Jabu to be accurate" and one right after that says "Set Dungeon Reward actors in Jabu Jabu to be accurate"?

I wonder if the Bongo with Sword trick should have "Entrance" tag since one of the two settings its possibly relevant under is an ER setting? I forget how we ruled on this type of situation in the past.

The Gohma trick tooltip mentions "first sphere of progression" which I think is terminology not really seen elsewhere in the GUI? It also doesn't matter whether it's in the first sphere or not as long as they're not ALL locked by Gohma. You could mention how rare it would be for a seed to actually lock all Deku Nuts behind Gohma, but in the end I don't think that a note about the rarity of the relevance of the trick is really needed. I also don't think the trick needs to mention that "This trick applies to both Vanilla and Master Quest" since the bosses are not changed between the two versions. The Bongo trick also doesn't mention the mq/vanilla thing. I'm not convinced we need a trick about skipping Deku Nuts at all, though.


The basement ledge region you've added to Deku, the logic doesn't really make sense, though I think the only thing wrong is that you've got Slingshot as an option to get from the basement up onto that ledge. The intention I guess is that you go the long way around, but that actually needs some means of burning webs to do (which I guess was moved only to the access down into the boss room), and regardless you've already got logic for going the long way around with the new access from back rooms. I don't think this extra access with only Slingshot causes any bugs b/c both the GS and the boss room need some means of burning webs to get to anyway, or if shortcuts are on and you don't need to burn the webs to get to the boss room, the block is also pushed and so you have access to the ledge anyway, slingshot or no. Anyway tl;dr: Nothing's busted exactly, but remove Slingshot as an option for basement to basement ledge in vanilla Deku anyway.

Actual bug alert! The fairy pot from MQ DC was mistakenly removed. It's in the same place as the fairy pot from vanilla. Logical requirements to reach are has_bottle plus the same requirements as accessing the boss room.

For whatever reason, we generally put the conjunction ('and', 'or') at the end of the previous line rather than the start of the next. You've gone against that with your edits to vanilla and mq volvagia boss room access. I'm seeing also an instance in the vanilla Jabu file. Might be others.

Also, you need Hammer to reach MQ's Fire Temple Upper anyway, so you didn't need to add a check for that.

Why did you remove all of the tabbing from the MQ Jabu file? I'm also seeing removed tabbing in the boss room section in the overworld file, and the MQ Spirit file. The MQ Spirit file is particularly messed up actually.... oh god you've removed all the tabbing from vanilla Spirit oh no.

I think the past big octo->before boss exit in MQ Jabu is redundant now with the floor lowered event? I think you could also use that event in place of the at() for 2nd room upper chest.

Sort-of actual bug alert, after child has defeated the tails, if adult has Hover Boots or Hookshot, you could reach the boss area without having to defeat Big Octo, which I guess skips a Sword or Sticks requirement (since we don't consider adult fighting Big Octo as logical). So I guess you need an event for defeating the correct tail as well.

Actual bug alert again, the slingshot or shortcuts check that you intended to add to Barinade boss room access was actually put onto the wrong exit.

"Jabu Near Boss GS without Boomerang as Adult" needs to be renamed, and "logic_jabu_boss_gs_adult" doesn't make a lot of sense anymore either. Maybe instead of "Near Boss GS without Boomerang as Adult" replace with "Near Boss Room as Adult without Lowering the Platform"? Perhaps even dungeon shortcuts should have tackled this change, but certainly it should be done now that this trick is potentially a lot more important. I think you can also technically bring a box over to the door using a backwalk, so the tooltip is not 100% accurate, though I don't know that it's super important that that be updated.

I should go in-game and take a look around for things like hitting the switch in the pre-boss room as adult, but I'm not going to. I'm curious if Longshot could hit the switch somehow.

The logic you've written for barinade boss room access in vanilla Jabu should probably be broken up into multiple lines, since it's so long. I'm seeing a few more long lines on bosses in the OW file.

Bug? I noticed you added sticks as an option to kill Phantom Ganon, which was specifically not allowed before due to the amount of sticks that would take?

Shadow MQ Before Boss access already checks for Hover Boots, so you didn't need to check it again on the boss room access.

Apparently, Boomerang does not actually work on Bongo?

You also need lens logic for bongo. It probably has to be a separate lens trick now.

There's a comment about 'apparent redundancy' in the MQ Spirit file that I don't understand its purpose. I don't think it needs to be there at all? It happens a few times in logic that things get funneled down into a single region before going through a potentially randomized entrance. But reading on and seeing the following bug I realize now you didn't understand this region's purpose.

Bug! In vanilla Spirit, for some reason you've removed the separate boss platform region. Now the logic thinks if shortcuts are on you could maybe hookshot right up from the main room into the mirror puzzle, and obtain the checks up there without the necessary keys to go the normal way. It also believes that you need Mirror Shield and explosives to access the boss door even when coming up from below with the Hookshot when shortcuts are on, though those items are only needed if you actually need to solve the mirror puzzle*. So the "Beyond Final Locked Door" region needs to stay separate from the Boss Platform region (now named "Before Boss").

* While typing this out I realized a bug with our dungeon shortcuts implementation in vanilla Spirit. When you solve the mirror puzzle at the top of the dungeon, it ends with you lowering a platform that you then use to hookshot over to the boss door. With dungeon shortcuts on, this platform is lowered from the start. You can be expected to longshot up to it (or hookshot up if the trick is on). Without either of those things, you instead have to use your keys and climb up to the top of the dungeon, where you are still expected to solve the mirror puzzle using mirror shield and explosives, despite the fact that the platform has already been lowered and you can just jump down and hookshot straight from there to the boss. So the bug is that when shortcuts are on the logic thinks you need longshot, a trick, or explosives+mirror to reach the boss door, when technically there is a route that skips all of those. I think the solution is to take the access from beyond final locked door down to boss platform, and or dungeon shortcuts to the mirror+explosives requirement that's already there. This bug was introduced by shortcuts, has nothing to do with your PR.

I'd got a PR in for a Spirit Temple rewrite, I'm gonna fix that issue above in it.

@dewiniaid
Copy link
Author

So I can tell something went horribly awry while I was merging things, so I'll be going over everything in the last several commits -- may just create a clean branch and do a lot of cherry-picking. That said:

Why is there a comment that says "Set Dungeon Reward Actor in Jabu Jabu to be accurate" and one right after that says "Set Dungeon Reward actors in Jabu Jabu to be accurate"?

Not sure. Fixed in source. Also removed the redundant assignment to jabu_stone_object in that same place.

I wonder if the Bongo with Sword trick should have "Entrance" tag since one of the two settings its possibly relevant under is an ER setting? I forget how we ruled on this type of situation in the past.

If we have any actual documentation on what the tags are for and when they should be used, I am all ears. I basically guessed based on what we already had on tricks I had added.

The Gohma trick tooltip mentions "first sphere of progression" [...]

The Gohma trick is being removed entirely, since it's so unlikely to ever come up in a real seed. I'm still not 100% convinced a seed without any access to nuts is possible.

The basement ledge region you've added to Deku, the logic doesn't really make sense [...]

The logic was indeed wrong on multiple levels. It's added due to existing in MQ and the ER requirement that connections on shuffled entrances match on both normal and MQ.

I've revised the logic for both Ledge and Backroom access to be more accurate to the actual dungeon layout. (Previously, the logic for getting onto the ledge and crawling through as child was integrated into the basement -> backroom logic).

Actual bug alert! The fairy pot from MQ DC was mistakenly removed. It's in the same place as the fairy pot from vanilla. Logical requirements to reach are has_bottle plus the same requirements as accessing the boss room.

Will go through the history, figure out where this went, and put it back in.

For whatever reason, we generally put the conjunction ('and', 'or') at the end of the previous line rather than the start of the next. You've gone against that with your edits to vanilla and mq volvagia boss room access. I'm seeing also an instance in the vanilla Jabu file. Might be others.

PEP8 prefers breaking before operators, not after -- but it more strongly prefers consistency. I always preferred before, but I can adjust to use the latter.

Also, you need Hammer to reach MQ's Fire Temple Upper anyway, so you didn't need to add a check for that.

Why did you remove all of the tabbing from the MQ Jabu file? I'm also seeing removed tabbing in the boss room section in the overworld file, and the MQ Spirit file. The MQ Spirit file is particularly messed up actually.... oh god you've removed all the tabbing from vanilla Spirit oh no.

Logic .json files aren't actually legal valid json files. My IDE tries to fix them. I usually catch it and 'unfix' them, I missed this case. Will fix.

[Skipping over some Jabu MQ stuff for now since I'll need an actual conversation about this as I don't know MQ Jabu]

Actual bug alert again, the slingshot or shortcuts check that you intended to add to Barinade boss room access was actually put onto the wrong exit.

Fixed

"Jabu Near Boss GS without Boomerang as Adult" needs to be renamed, and "logic_jabu_boss_gs_adult" doesn't make a lot of sense anymore either. Maybe instead of "Near Boss GS without Boomerang as Adult" replace with "Near Boss Room as Adult without Lowering the Platform"? Perhaps even dungeon shortcuts should have tackled this change, but certainly it should be done now that this trick is potentially a lot more important. I think you can also technically bring a box over to the door using a backwalk, so the tooltip is not 100% accurate, though I don't know that it's super important that that be updated.

This has been on my list to change for awhile, but I haven't had a good idea on what to change it to. Renamed to 'Jabu Near Boss Room as Adult with Hover Boots' ("logic_jabu_boss_hover")

I should go in-game and take a look around for things like hitting the switch in the pre-boss room as adult, but I'm not going to. I'm curious if Longshot could hit the switch somehow.

Somebody on my discord actually did a bunch of testing on this and it arguably has some value as being tricks. It's definitely a pending task to look into more.

The logic you've written for barinade boss room access in vanilla Jabu should probably be broken up into multiple lines, since it's so long. I'm seeing a few more long lines on bosses in the OW file.

These are usually because I don't feel like fighting my IDE on not-really-JSON files. (Also why I'd love to redo our logic to be defined as YAML instead, but that's another story.) Fixed for Jabu, I'll slowly work on the others.

Bug? I noticed you added sticks as an option to kill Phantom Ganon, which was specifically not allowed before due to the amount of sticks that would take?

I feel like this is one that's gone back and forth a few times, but IIRC tennis doesn't even work with sticks so removed them.

Shadow MQ Before Boss access already checks for Hover Boots, so you didn't need to check it again on the boss room access.

I know there's long precedent, but I'm not a huge fan of relying on "implied" logic cases of sort of "You can only reach point A if you have X, so don't check for X when going from A to B even if you need it there too.". It's been a decent headache to have to work around when adding boss shuffle and presumably for shortcuts as well.

That said, I don't think full-on room shuffle (ala ALTTPR doors) will ever be a thing, so this could probably stand to be removed.

Apparently, Boomerang does not actually work on Bongo?

There's a comment about 'apparent redundancy' in the MQ Spirit file that I don't understand its purpose. I don't think it needs to be there at all? It happens a few times in logic that things get funneled down into a single region before going through a potentially randomized entrance. But reading on and seeing the following bug I realize now you didn't understand this region's purpose.

All forms of ER rely on region names as defined in logic. In most cases, it's a moot issue as all dungeon lobbies are named the same between normal and MQ... and all other ER doesn't touch dungeons.

However, normal and MQ logic files sometimes have differing names for the region that connects to the boss room and it doesn't always make sense to rename them. Since ER will look for a region named "Spirit Temple Before Boss" and an exit in that region going to "Twinrova Boss Room", that region has to to exist in both files.

To work around this, I essentially create an empty 'Spirit Temple Before Boss' region that is nothing more than a connector to the boss region. Previously, the empty region could have just not existed at all and the connection could have been in Spirit Temple Boss Area.

re: vanilla Spirit logic: I'll probably wait for the shortcuts bugfix and re-apply on top of that.

@r0bd0g
Copy link

r0bd0g commented Jan 18, 2022

"I basically guessed based on what we already had on tricks I had added."
Seems to be the thing to do honestly. In the case of the bongo trick I think b/c such a large portion of where it would be used is from boss room shuffle, that I would give it the entrance tag even if it's not necessarily only relevant under ER.

"I'm still not 100% convinced a seed without any access to nuts is possible."
It definitely is possible in theory.

"Renamed to 'Jabu Near Boss Room as Adult with Hover Boots"
Since Hover Boots can only be used as adult, now 'as Adult' is not really necessary to say. I didn't say 'with Hover Boots' initially because using the hover boots to get over there is in default logic in MQ. The part that is a trick is dealing with the pressure switch to open the door.

"Somebody on my discord actually did a bunch of testing on this and it arguably has some value as being tricks. It's definitely a pending task to look into more."
I noticed the skulltula in the same spot in MQ Jabu was in logic with longshot. I'm not sure how much differences in placement or hitboxes or whatever might be effecting what's possible or reasonable here.

"I know there's long precedent, but I'm not a huge fan of relying on 'implied' logic cases of sort of 'You can only reach point A if you have X, so don't check for X when going from A to B even if you need it there too.'"
This is not a case of that as you don't actually need Hover Boots to reach this room. The only reason hovers are checked on region access is b/c everything in that room requires hovers. The skulltula in that room also requires hovers to reach, but you didn't add a check for them there. You should think of the region as referring to the area of that room that's closer to the boss door.

"All forms of ER rely on region names as defined in logic. In most cases, it's a moot issue as all dungeon lobbies are named the same between normal and MQ... and all other ER doesn't touch dungeons."
You're not really understanding what I'm saying here. It may be true that a region needed to exist in MQ in order to forward into the boss room with the same name as the region in vanilla. But the region you're doing this from needs to exist anyway, because you can't exit into the boss room from two different regions. You have to collect the routes both from falling down from above and from hookshotting up from below before exiting into the boss room. So there's no need for a large comment to explain why this region exists especially when the comment does not give the real reason the region needs to exist. You've introduced a bug in vanilla by omitting this 'redundant' region. You're collecting those two separate routes to the boss room in the upper portion of the dungeon, which cannot actually be accessed from the main room just by hookshotting up. This creates two problems, the first being that the checks at the top of the dungeon will be in logic without keys necessary to climb up there, and the second being that the logic could expect you to have to solve the mirror puzzle to reach the boss room even though it might not actually be necessary. (And it was when thinking about this bug that you've introduced that I realized in the shortcuts logic we wrote we were also potentially checking for solving the mirror puzzles unnecessarily, as we were still checking for the ability to solve the mirror puzzle even though, with the platform lowered, nothing stops you from just immediately jumping down.)

@r0bd0g
Copy link

r0bd0g commented Jan 18, 2022

My Spirit Logic Rewrite PR now includes a fix for that dungeon shortcuts bug. If you want to see the fix applied to the current logic file you I guess probably you could have somebody do that up.

@dewiniaid
Copy link
Author

dewiniaid commented Jan 18, 2022

Last couple commits should fix most of the issues @r0bd0g mentioned. I haven't yet closely examined the Spirit Temple MQ or Jabu MQ logic yet so those are TODO.

Normal Spirit Temple logic was replaced outright with the implementation in #1481 and then re-adapted for boss shuffle.

@r0bd0g
Copy link

r0bd0g commented Jan 18, 2022

Somehow you didn't get the version of the spirit file with the bug I mentioned fixed in it.

@dewiniaid
Copy link
Author

This is why you don't code when there's too much blood in your caffeine stream, folks. Fixed.

@dewiniaid
Copy link
Author

Working on cleaning up history.

Actual bug alert! The fairy pot from MQ DC was mistakenly removed. It's in the same place as the fairy pot from vanilla. Logical requirements to reach are has_bottle plus the same requirements as accessing the boss room.

Now fixed locally

Why did you remove all of the tabbing from the MQ Jabu file? I'm also seeing removed tabbing in the boss room section in the overworld file, and the MQ Spirit file. The MQ Spirit file is particularly messed up actually.... oh god you've removed all the tabbing from vanilla Spirit oh no.

Now also fixed locally the rest of the way. (This was my IDE choking on broken Javascript and being overly "helpful")

Sort-of actual bug alert, after child has defeated the tails [in MQ Jabu], if adult has Hover Boots or Hookshot, you could reach the boss area without having to defeat Big Octo, which I guess skips a Sword or Sticks requirement (since we don't consider adult fighting Big Octo as logical). So I guess you need an event for defeating the correct tail as well.

Not knowing Jabu MQ at all, I'm not certain what this event should be named or its conditions should be. I'm assuming it's in Jabu Jabus Belly Depths and requires a boomerang?

@r0bd0g
Copy link

r0bd0g commented Jan 19, 2022

Alright so you need explosives, slingshot, and rang to even get into depths. Then I think it's red tail? which is the one on the far left. To reach that you have to do brown tail (you might want to check the colours of these things before naming the event, so you can use the proper colour name, just go in and c-up them) which is behind a web that will need sticks or din's. I think green tail is the back middle one which won't have additional requirements, but is irrelevant for the purposes of removing that tail before the boss. You might want to go in and confirm all this. Also remember that this tail in front of the boss is removed under shortcuts.

@dewiniaid dewiniaid force-pushed the feature/boss-shuffle-vs-official branch from e407579 to ed40d63 Compare January 20, 2022 01:12
@r0bd0g
Copy link

r0bd0g commented Jan 21, 2022

You forgot the bottle on the DC fairy pot.
Haven't rereviewed the rest of it yet... Make an attempt at a Jabu MQ fix if you haven't already and then I'll tell if you did it wrong idk.

@dewiniaid dewiniaid force-pushed the feature/boss-shuffle-vs-official branch from f418c31 to 741eb81 Compare January 22, 2022 15:13
@dewiniaid
Copy link
Author

dewiniaid commented Jan 22, 2022

Added some changes for MQ Jabu logic. Found a bug in current Dev logic in the process, and that fix is also present. See 741eb81.

@dewiniaid dewiniaid marked this pull request as ready for review January 25, 2022 12:21
@dewiniaid
Copy link
Author

This still needs a full final review of logic, but I think we're past the point of being only a draft PR by now.

@Hexocyte
Copy link

I think the exits to the boss rooms should be in their own regions (e.g. the Gohma entrance could be "Deku Tree Boss Door -> Gohma Boss Room"). Otherwise I imagine glitch logic for boss key skips from other parts of the dungeon would be complicated. For some dungeons it wouldn't be too bad as it is now, since glitch logic could repurpose the regions, but that would be messy, and "Fire Temple Lower" couldn't be repurposed since it's the same region as the dungeon entrance.

@dewiniaid
Copy link
Author

That's not a terrible idea. I know @DuskTheUmbreon is most likely the one adding glitch logic as part of Glitch Logic 2.0 and will have to deal with this, so going to ask him.

@Roman971
Copy link
Collaborator

Roman971 commented Feb 1, 2022

I think it would make more sense to have the setting as "Shuffle Boss Entrances", since it only shuffles the entrances and not the bosses themselves (which could technically be done in the future). It sounds more accurate and a lot more future-proof, especially since the setting could eventually be integrated with mixed pools and/or decoupled entrances.

Note: I haven't looked at the implementation so I don't have other comments, but I'll probably give it a full review soon.

@r0bd0g
Copy link

r0bd0g commented Feb 12, 2022

The logic for DC boss room was not separated properly. Vanilla DC's logic has assumed either explosives or DC shortcuts enabled in order to get into that room, and so regardless you would be able to pass the bombable floor. MQ DC you could potentially have used a trick with strength to light the eyes to reach the boss room, so in MQ it could not be assumed. You used the vanilla DC logic for the DC boss room but you really needed to use the MQ DC logic, which was more complete. You also have a trick in that room about hammering the floor that currently is an MQ trick with MQ built right into the name, but that will no longer be the case with boss room shuffle. You will have to rename that trick and probably reword the tooltip as well. You also have an awkward question to answer about the nature of dungeon shortcuts with regards to that bombable floor. Which dungeon's shortcuts should be enabled before the floor is removed? I might suggest it should actually be tied to the dungeon that that boss room is in, which will be rather complicated to implement correctly. (It would also give a use to the water temple shortcuts option, which currently does nothing so who knows if that's even hooked up atm. And be on the lookout for any tooltips regarding shortcuts that might need updating as well.)

I figured you would move Ganon's Tower into the boss room file as well. We often get questions about why that area is in the OW file. It'd be nice to finally put that to rest.

Actual bug I think, the Jabu MQ Fairy Pot appears to have gone missing? The rest of this paragraph is not so important. Usually we put the GS's last in the logic files? So it's weird that you reordered Jabu Jabus Belly MQ Near Boss Chest to come last instead. On "Jabu Jabus Belly MQ Second Room Upper Chest", I suggest that "at('Jabu Jabus Belly Before Boss', is_child)" be replaced with your new "Jabu Jabus Belly Floor Lowered" event, rather than essentially creating a second event for the same thing. (I guess also the exit from Past Big Octo to Before Boss is redundant as well, which I noticed you did you remove in vanilla but have left in MQ.)

There's a lot of tabbing was removed from numerous files that should be restored.
(I think at least some of this stuff I've said the last time I went through it.)

@dewiniaid
Copy link
Author

I think it would make more sense to have the setting as "Shuffle Boss Entrances" [...]

Changed.

The logic for DC boss room was not separated properly. [...]

Updated to match MQ logic. The dungeon shortcut was inadvertently omitted as well. Removed the "MQ" from the trick name and ID and updated the description accordingly.

You also have an awkward question to answer about the nature of dungeon shortcuts with regards to that bombable floor. Which dungeon's shortcuts should be enabled before the floor is removed? I might suggest it should actually be tied to the dungeon that that boss room is in, which will be rather complicated to implement correctly.

I think the previous determination was to base it off its native dungeon e.g. DC, but this is up for debate. Roman has expressed interest in potentially allowing boss entrances to be included in mixed pools (which has terrifying implications for logic) -- so one question here is which dungeon shortcut to use if a boss room isn't located inside a dungeon at all.

That said, my thought for mixed pools would be that the dungeon rewards would show based off native boss locations. If boss entrances aren't included in the mixed pools, they continue to use the redirection they have now.

Regardless, it shouldn't be too hard to add in a mechanism for bosses to know where they are in logic and select the appropriate shortcuts. Notably, this currently only applies to King Dodongo.

I figured you would move Ganon's Tower into the boss room file as well. We often get questions about why that area is in the OW file. It'd be nice to finally put that to rest.

I had asked about this and hadn't got a conclusive answer -- should it stay in Overworld, move to Bosses, or get a separate Ganon's Tower file? The shared files are now loaded from a list so it's trivial to add more.

Actual bug I think, the Jabu MQ Fairy Pot appears to have gone missing [...]

Brought it back, hopefully at the right spot. Again. Also reordered the GS logic (that was a side effect of other moves).

"Jabu Jabus Belly MQ Second Room Upper Chest" [... ]

Changed. I wonder if it would be worthwhile to have the same event trigger at the start of Jabu if shortcuts are on to eliminate a lot of the "or jabu_shortcuts" in the logic.

There's a lot of tabbing was removed from numerous files that should be restored.
(I think at least some of this stuff I've said the last time I went through it.)

Made some small adjustments. Gotta love how Ctrl+V doesn't paste the same thing that was Ctrl+C'd.

@r0bd0g
Copy link

r0bd0g commented Feb 13, 2022

Yes, I suggest moving Ganon's Tower into the bosses file.

There's still a small amount of tabbing that was removed and not restored, I think mainly in the MQ Spirit file.

@Zannick Zannick added Component: ASM/C Changes some internals of the ASM/C libraries Component: Logic Non-trivial changes to the JSON logic files Component: Setting specific to setting(s) labels Feb 17, 2022
- Fix MQ Dodongo Fairy Pot logic
- Fix extraneous comma in Bongo Bongo logic helpfully added in by my IDE
- It is possible for adult to reach the chest before the boss room
  with Hovers or Hookshot if child spawns it first using the slingshot.
  This logic was not previously accounted for, and is relevant if dungeon
  entrances are shuffled and either boomerang or explosives have not been
  found yet.

- It is possible for the boss room to be reached by adult if child
  clears the red parasitic tentacle, which has no special requirements
  beyond reaching Jabu Jabu Belly's Depths.  This is potentially relevant
  if for some reason Big Octo isn't in logic, particularly in conjunction
  with some not-yet-defined tricks for hitting the cow switch with items
  other than a slingshot.
*handwave* This is not the chest that I am looking for.
Split bosses out of Overworld.json into a new Bosses.json file.
For glitched logic, that file is currently an empty placeholder which is
fine since glitched logic doesn't yet support boss shuffle.

Add the notion of "boss door" regions.  Now, all bosses are connected as
e.g. "Deku Tree Boss Door -> Gohma Boss Room".  This is mostly redundant
in glitchless logic, but should drastically simplify things like boss key
skips in glitched logic.

Boss doors are now defined in Bosses.json rather than their respective
dungeon files, since they do not differ between Normal and MQ.

Glitchless boss key requirements are now defined on the Door -> Boss Room
transition.  Glitch logic will probably need to handle that differently.
- Take the MQ out of "Dodongo's Cavern MQ Smash the Boss Lobby Floor"
  as it can apply in vanilla too with boss shuffle.
- Rename Shuffle Dungeon Bosses to Shuffle Boss Entrances
- Update King Dodongo logic
- Add missing MQ Jabu fairy pot, again.
- Minor cleanup in MQ Jabu logic
- Restore lost indentation in Spirit Temple MQ logic.
Light mode does age-appropriate boss shuffling, so the child bosses will
be shuffled with themselves and likewise for the adult bosses.

Full is the old behavior of mixing everything together.

The option probably can stand to be wordsmithed some.
It turns out when you split the entrance type you were using from 'Boss' to 'AdultBoss' and 'ChildBoss', there's a lot of other things to fix up, too.  Oops.

Fixes hint stone generation and savewarp/deathwarp remapping from boss rooms.
@dewiniaid dewiniaid force-pushed the feature/boss-shuffle-vs-official branch from d0ff9ca to 1f5cee5 Compare February 17, 2022 22:53
@dewiniaid
Copy link
Author

Rebased to be against 6.2.29

set_jabu_stone_actors(rom, jabu_actor_type)
# Also set the right object for the actor, since medallions and stones require different objects
# MQ is handled separately, as we include both objects in the object list in mqu.json (Scene 2, Room 6)
if not world.dungeon_mq['Jabu Jabus Belly']:
jabu_stone_object = world.get_location('Barinade').item.special['object_id']
rom.write_int16(0x277D068, jabu_stone_object)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be redundant with the code added above. Why is a change needed here anyway, besides inserting the boss_map indirection?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a backport from Roman's fork. Boss Shuffle began there and I ported it to Dev branch since I felt it more likely to be accepted here and then merged into Roman's that way. I think I didn't realize that Dev didn't have it this way when rebasing.

Here is the original source: https://github.com/Roman971/OoT-Randomizer/blob/Dev-R/Patches.py#L1863..L1880

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code added above was a leftover on my branch (I'm guessing due to some merge conflict), and I just removed it from Dev-R. I think you should be able to just adjust the existing code to use boss_map and omit the rest.

Here is the commit where I removed it for reference: Roman971@ba15f86

README.md Outdated
@@ -111,6 +111,8 @@ do that.
* New cosmetic setting `Disable Battle Music` turns off the battle music from being near enemies, allowing the background music to continue uninterrupted.
* New setting `Plant Magic Beans` automatically plants all the Magic Beans from the start.
* New setting `Key Rings` which can be enabled per-dungeon to replace all of its individual Small Keys into a singular Small Key Ring containing all the small keys for that dungeon.
* New cosmetic setting `Disable battle music` turns off the battle music from being near enemies, allowing the background music to continue uninterrupted.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is a duplicate.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in source. Missed that when backmerging.

@@ -109,6 +109,15 @@ def get_scene(self):
return None


def change_dungeon(self, new_dungeon):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for boss rooms to be tagged with a dungeon at all? I think it could be more straightforward to not consider boss rooms as part of any dungeon's hint area, and instead relying on finding the dungeon as the nearest hint area in the same way that interiors do. This would also make hints behave well in mixed pools boss shuffle if that ever becomes a thing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, can_fill() in Region.py relies on .dungeon being set to know if a location qualifies for settings like "small keys in any dungeon"

Updating change_dungeon to accept None would be a step towards allowing mixed pools, however -- but as this branch doesn't support mixed pools at all it seems a little out-of-scope for the moment.

@@ -166,6 +166,14 @@ def remove(self, item):
del self.prog_items[item.name]


def region_has_shortcuts(self, region_name, fallback_dungeon):
region = self.world.get_region(region_name)
dungeon_name = (region.dungeon and region.dungeon.name) or fallback_dungeon
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use reverse_boss_map instead of the dungeon field.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverse_boss_map just is {"New Boss Location Name": "Vanilla Boss Location Name"} (or possibly the other way around) -- it doesn't have actual dungeon names at all. It's intended for pedestal hints and things like showing the correct stone/medallion in Jabu-Jabu cutscenes.

This method's sole purpose, by the way, is King Dodongo and shortcuts logic (making water temple shortcuts potentially useful in this edge case). No other boss room is affected by (or needs to be affected by) shortcuts.

@fenhl
Copy link
Collaborator

fenhl commented Mar 5, 2022

An issue with this feature is that dungeon reward goal hints become less useful since they use the boss name, whose location may not be known. To alleviate this, I propose modifying these hints if boss shuffle is on to add a second text box hinting the location of the boss, for example:

They say that #Kakariko Village# is on the path to #Twinrova#...^who dwell in #Jabu Jabu's Belly#.

@dewiniaid
Copy link
Author

An issue with this feature is that dungeon reward goal hints become less useful since they use the boss name, whose location may not be known. To alleviate this, I propose modifying these hints if boss shuffle is on to add a second text box hinting the location of the boss [...]

Talked about this in #dev-suggestions some, basically my thoughts:

Revealing boss locations is a little excessive in my mind. The current format allows a sort of big-brained play in predicting where a boss may be based on what items were received at Path locations -- e.g. a longshot strongly implies the boss will be in Water Temple, a mirror shield strongly implies Spirit, and boomerang weakly implies Jabu (this one is iffy because it could also mean required progression is on skulls). Additionally, boss shuffle is supposed to be somewhat of a "Surprise! It's Twinrova!" moment, and hints spoiling that early ruin that aspect.

Somebody suggested changing these hints to say dungeon names instead of boss names. This is a fair middle-ground compromise (though I'm still not a huge fan), but it eliminates being able to be smart and get information from the items you've found.

I counter-offered the possibility of using the stone or medallion name. This would be a disruptive change, but adds some an interesting value to path hints in settings where you don't know what what dungeon has which medallion -- Longshot on the path of Fire Medallion implies a few possibilities -- like Fire Medallion is in Water Temple or at Water Temple Entrance or at whatever dungeon is at GTG.

I'm not opposed to changing this, but would like to see consensus on whichever way we go.

@r0bd0g
Copy link

r0bd0g commented Mar 6, 2022

It occurred to me that our saying "path to boss" means you don't need to know which dungeon is which medallion to understand the hint. If it said "path to Fire Medallion" or something, you'd have to be able to read the altar/find the compass to know which boss that refers to. So if because of boss shuffle you change path hints to say medallion/stone instead of saying the boss, the problem of not knowing which dungeon that means you need to beat actually just gets moved around. Unless you want to go full spoil everything "path to Bongo Bongo for the Fire Medallion inside the Water Temple".

@Hexocyte
Copy link

All the presets that have the lensless Shadow invisible platform trick enabled should also have the new lensless Bongo trick enabled.

- Fix logic_lens_bongo being missing from default presets.
- Fix duplicated line in README.md.
Copy link
Collaborator

@cjohnson57 cjohnson57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems good to me, I've done a couple runs myself and this branch has been tested very extensively by the community.

Only very minor thing is that bow should be in logic for stunning Gohma (only works on the ceiling), but if you can get to Gohma as adult I'm pretty sure you'll have nut access somehow anyway.

@dewiniaid
Copy link
Author

Only very minor thing is that bow should be in logic for stunning Gohma (only works on the ceiling), but if you can get to Gohma as adult I'm pretty sure you'll have nut access somehow anyway.

I think we'd worked out that the likelihood of reaching Gohma without access to nuts is so astronomically small (if even nonzero) that it's sufficient to simply always requires nuts for Gohma. Since nuts are thus always assumed to be available, other methods of stunning are irrelevant.

Logic and a trick for nutless Gohma was in an earlier version, but was pulled due to community consensus.

@cjohnson57
Copy link
Collaborator

Fair enough, that does make sense.

@r0bd0g
Copy link

r0bd0g commented Apr 10, 2022

As far as logic goes the last thing I had concerns over is that I felt Tower should be moved into the boss room file.

(I'll suggest that some kind of closed forest compatibility could still be possible, though I'm not sure it's worth the trouble. I could see it like, Jabu inside Deku, and then Gohma at Barinade. You'd have to change a few tooltips and I guess add closed forest logic for jumping down from the Spirit hands so it doesn't put Spirit inside Deku and allow you to escape that way.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Logic Non-trivial changes to the JSON logic files Component: Patching Affects the patching of the ROM Component: Randomizer Core Generally the core functions of the python Component: Setting specific to setting(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants