OoT-Randomizer icon indicating copy to clipboard operation
OoT-Randomizer copied to clipboard

Make grotto entrances act more like normal entrances

Open fenhl opened this issue 1 year ago • 1 comments

There are several bugs related to grotto entrances and exits:

  • #831
  • Void and death warps involving grottos act differently from how they do with other entrances, if grottos are shuffled. This is one of the two remaining blockers for mixed pools (the other being overworld entrance parity).
  • As discussed at https://github.com/OoTRandomizer/OoT-Randomizer/issues/1833#issuecomment-1440047094, the Sheik in Kakariko cutscene does not trigger if Kakariko is entered from one of its two grottos.
  • Attempting to set a savewarp to inside or outside of a grotto causes crashes or incorrect behavior depending on platform. Mixed pools bosses currently has an awkward workaround for this, and this would also restrict the “full” spawn entrance pool if a “full one-way entrances” feature is revisited in the future.

These all seem to be symptoms of the unusual way in which grottos are implemented, which according to @Roman971 should be possible to fix nowadays with decomp knowledge. The changes made to grotto behavior on Dev-R might be a useful starting point.

fenhl avatar Jun 25 '23 10:06 fenhl

It's been a while since I have looked at how grottos work in OoT but basically all these issues come from the fact that grottos aren't implemented as actual "entrances" (with their own exits and spawns), and instead it's the grotto hole actor that defines which grotto to load in and saves the scene + position/rotation to place the player at when exiting the grotto.

Currently there are partial reworks of this system to make ER work (see ASM/src/grotto.asm in this repo, or the one in my fork for a more "advanced" version compatible with mixed/decoupled), but they all have various limtations like not being able to warp inside a grotto or not being able to use a grotto entrance/exit as a void or death respawn. They also have separate entrypoints in the code which is probably why the Sheik in Kakariko cutscene trigger doesn't happen for grottos.

At this point I think we should look towards completely reworking grotto entrances and exits to behave as normal entrances, with their own exits and spawns in the scene data, and probably part of the entrance table as well. For instance, the "going out of a grotto" animation could be implemented as a spawn parameter similar to the spawns used for being thrown out of gerudo fortress.

Roman971 avatar Jun 25 '23 15:06 Roman971