Rando: Boss Entrance Shuffle#2194
Conversation
05bd4a3 to
ba13e6b
Compare
briaguya0
left a comment
There was a problem hiding this comment.
Overall this is looking really great! Super excited to see this feature!
I left a couple questions as comments, but I don't see anything big that needs changing!
| forwardEntrance->SetType(forwardEntry.type); | ||
| forwardEntrance->SetAsPrimary(); | ||
|
|
||
| // When decouple entrances is on, mark it for everything except boss rooms so |
There was a problem hiding this comment.
everything except boss rooms so
looks like you didn't finish writing the comment here, so what?
There was a problem hiding this comment.
I'll fix that, and a typo in another comment
| if (Settings::ShuffleBossEntrances.Is(SHUFFLEBOSSES_FULL)) { | ||
| entrancePools[EntranceType::Boss] = GetShuffleableEntrances(EntranceType::ChildBoss); | ||
| AddElementsToPool(entrancePools[EntranceType::Boss], GetShuffleableEntrances(EntranceType::AdultBoss)); | ||
| // If forest is closed, ensure Ghoma is inside the Deku tree |
There was a problem hiding this comment.
could you explain why this is required?
There was a problem hiding this comment.
closed forest requires that Ghoma is defeated to be opened. So Ghoma needs to be guaranteed to be in the Deku Tree.
There is already an exclusion to remove deku tree from dungeon entrance randomizer when closed forest is on right below (because of Spirit temple hands).
| void SetDecoupled() { | ||
| decoupled = true; | ||
| } |
There was a problem hiding this comment.
i'm assuming we never want to unset decoupled so this should be fine as is, but part of me thinks it should be
| void SetDecoupled() { | |
| decoupled = true; | |
| } | |
| void SetDecoupled(bool decouple = true) { | |
| decoupled = decouple; | |
| } |
just in case or something
There was a problem hiding this comment.
Yeah, I don't see that use case coming up (as depending when you'd want to change it, you'd have to reshuffle the entrances).
| } | ||
|
|
||
| // form hint text | ||
| Text locationText = GetHintRegion(Location(hintedLocation)->GetParentRegionKey())->GetHint().GetText(); |
There was a problem hiding this comment.
so if i'm reading this correctly
AreaTable(parentRegion)->GetHint().GetText();and
GetHintRegion(parentRegion)->GetHint().GetText();are functionally equivalent, which is why this can be simplified?
There was a problem hiding this comment.
AreaTable() will get the direct area of the region, and if that region hint is "No Hint", then "No Hint" gets used, which is not what we want.
GetHintRegion() will check if the region has a valid hint, and if not, search the exits region until it can find a hint. This is how interiors work so that a randomized interior will use the connected region as its hint.
Boss heart containers are now set as "No Hint" so the reverse search can be performed.
Previously if an item was marked as dungeon, then it was guaranteed to have a hint, then there was no need to worry about the reverse search, but thats not the case with Boss shuffle now.
| // Copy the actorentry properties to avoid modifying the original cached pointer | ||
| // The assign a pointer of our modified actoreEntry back |
There was a problem hiding this comment.
Scene resources are cached, so any modification to the pointer is permanently retained even for vanilla, and we can't invalidate scenes currently (my same compliant w.r.t. water box collisions also modifying cached scene resources).
Since playstate just holds actorentry as a pointer and doesn't clear it, I can have this object here and just replace the values as needed, without modifying the original pointer.
This introduces boss entrance shuffle to rando!
The options for boss entrance shuffle are the following:
Preliminary support for separating boss rooms in the logic location access was introduced on the 3ds side, that I pulled in.
The actual support for shuffling the boss entrances based on settings is new, and based off of n64 rando. (I will upstream these changes to 3ds rando after play testing).
On the SoH side, I had to adjust how bluewarps were overridden such that if entering Deku Tree -> Water Temple -> Bongo-Bongo, then the bluewarp in Bongo-Bongo's room should take Link back outside of the Deku Tree. I also adjusted the savewarp override and implemented the gameover override so that save/death warping in a boss room takes you back to the connected dungeon.
Boss room values were added to the entrance tracker.
There are two authentic bugs in the game:
Both of these have been repaired through "hooks" that do not permanently modify cached resources.
For hints, when dungeon rewards are shuffled at the end of dungeons, then the altar hint will specify the dungeon that the boss room is connected to (e.g. Light medallion behind Gohma, Water Temple -> Gohmas room, then the alter will say Light medallion is in Water Temple). When rewards are not shuffled at the end of dungeons, then gossip stone hints for any item as a boss reward will mention the "X boss holds Y" instead or saying "X dungeon rewards Y". These behaviors match what N64 rando does.
Build Artifacts