Change Region's scene string with a SceneId#5398
Change Region's scene string with a SceneId#5398Malkierian merged 15 commits intoHarbourMasters:developfrom
Region's scene string with a SceneId#5398Conversation
No possible for `RR_CASTLE_GROUNDS` & "link's pocket" areas
|
Deriving time pass form the scene is problematic for psuedo-regions used to filter out access such as swim checks when you spawn in water, as it can cause the player to get time pass in a area they cannot actually survive in. What is the intention for those situations? The colossus hands would also be a problem but apparently they were set to spirit temple anyway, which raises spirit temple key logic questions about TimePass I would have to think about. |
|
I think for those regions we could use |
The issue here is that they could then connect back to the original scene as they won't be caught by the check in entrance shuffle that prohibits own-scene connections |
Pepper0ni
left a comment
There was a problem hiding this comment.
A few things I noticed going over it all, mostly side effects of moving from text to ID and mistakes in assigning timepass.
|
|
||
| // Entrances shouldn't connect to their own scene, fail in this situation | ||
| if (entrance->GetParentRegion()->scene != "" && | ||
| if (entrance->GetParentRegion()->scene != SCENE_ID_MAX && |
There was a problem hiding this comment.
This needs an exception to handle OGC, Hyrule Castle and Castle Grounds (currently assigned as SCENE_ID_MAX) and make sure they are not connected to each other.
Additionally, all grottos and fairy fountains have separate scene text right now that allows them to connect to each other in decoupled + mixed pools, under this system they would all have the same scene and be unable to connect, which I doubt was your intention.
There was a problem hiding this comment.
How does entrance rando currently handle going to hc/ogc as the wrong age?
Fixed the grottos/fairy fountains
There was a problem hiding this comment.
It uses a filtration region called RR_CASTLE_GROUNDS, which splits the logic into the HC and OGC regions on entry, enforcing the age restriction, however leaving these 2 does not go through this region unless it's the south connection, as RR_CASTLE_GROUNDS also connects to market.
There was a problem hiding this comment.
In practice, I believe what happens is just that HC and OGC are the same scene, and the difference is only determined by what age you are going in, like Market, in case that was the angle you were after.
soh/soh/Enhancements/randomizer/location_access/dungeons/ganons_castle.cpp
Outdated
Show resolved
Hide resolved
| }); | ||
|
|
||
| areaTable[RR_SPIRIT_TEMPLE_OUTDOOR_HANDS] = Region("Spirit Temple Outdoor Hands", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, { | ||
| areaTable[RR_SPIRIT_TEMPLE_OUTDOOR_HANDS] = Region("Spirit Temple Outdoor Hands", SCENE_SPIRIT_TEMPLE, {}, { |
There was a problem hiding this comment.
Technically speaking, Time passes on the hands, however the complexities of spirit key logic make me unsure if I want it to count as a time pass area in the long term. I would have to think about it.
soh/soh/Enhancements/randomizer/location_access/dungeons/water_temple.cpp
Outdated
Show resolved
Hide resolved
| //With multi-area support {RA_CASTLE_GROUNDS} is not strictly required anymore, as any interior here could inherit both | ||
| //{RA_HYRULE_CASTLE} and {RA_OUTSIDE_GANONS_CASTLE}, but a setting to merge the latter 2 into the former may be preferred | ||
| areaTable[RR_CASTLE_GROUNDS] = Region("Castle Grounds", "Castle Grounds", {RA_CASTLE_GROUNDS}, NO_DAY_NIGHT_CYCLE, {}, {}, { | ||
| areaTable[RR_CASTLE_GROUNDS] = Region("Castle Grounds", SCENE_ID_MAX, {RA_CASTLE_GROUNDS}, {}, {}, { |
There was a problem hiding this comment.
Similar to the boss situation, this will be able to connect to OGC and market if not accounted for, however this trio need special casing due to the way the area is handled between ages.
| areaTable[RR_CASTLE_GROUNDS] = Region("Castle Grounds", "Castle Grounds", {RA_CASTLE_GROUNDS}, NO_DAY_NIGHT_CYCLE, {}, {}, { | ||
| // | ||
| //Temporarily uses SCENE_OUTSIDE_GANONS_CASTLE to avoid self connection between ages | ||
| areaTable[RR_CASTLE_GROUNDS] = Region("Castle Grounds", SCENE_OUTSIDE_GANONS_CASTLE, {RA_CASTLE_GROUNDS}, {}, {}, { |
There was a problem hiding this comment.
This should work for now, but at some point OGC is going to want it's own day/night setting to handle the perma-night, do you have an idea of how to separate this from the rest of OGC when that happens?
There was a problem hiding this comment.
We could add an explicit check for it in AreEntrancesCompatible (checking the name or the area or the id) and change this back to SCENE_ID_MAX.
There was a problem hiding this comment.
Fair enough, so long as there's a plan for when I get around to it. a hardcoded exception never feels great but it seems appropriate in this case given the special case
I have added right hand to the shared area, so i do not want time pass on the hands. I'm pretty sure any case where we have certain hands access we will get colossus and it's TimePass in logic anyway |
|
Just so I know, what was the result of the discussion about pseudo-areas and timePass inheritance? I think it could probably go in, but that has me still concerned. |
I just looked it over, and there was indeed no satisfactory response, I guess we need that fallback I mentioned immediately rather than later, so I'm unapproving until there's a manual TimePass override option or some other solution that doesn't cause entrance connection issues |
Pepper0ni
left a comment
There was a problem hiding this comment.
Had a review, the core structure seems solid now, there's just some shortcut stuff i found issue with and some other small things
soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp
Outdated
Show resolved
Hide resolved
soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp
Outdated
Show resolved
Hide resolved
soh/soh/Enhancements/randomizer/location_access/dungeons/fire_temple.cpp
Outdated
Show resolved
Hide resolved
soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp
Outdated
Show resolved
Hide resolved
soh/soh/Enhancements/randomizer/location_access/overworld/zoras_river.cpp
Outdated
Show resolved
Hide resolved
|
@Pepe20129 Address Pepper0ni's latest review and the merge conflicts, and I think we can get this in. @Pepper0ni if you wouldn't mind going back through the other reviews and seeing if the remaining unresolved conversations can be marked as resolved, I'd appreciate it. |
|
Fixed merge conflicts |
|
Looks like you might be missing an include in deku_tree. |
soh/soh/Enhancements/randomizer/location_access/overworld/zoras_river.cpp
Outdated
Show resolved
Hide resolved
soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp
Outdated
Show resolved
Hide resolved
| areaTable[RR_CASTLE_GROUNDS] = Region("Castle Grounds", "Castle Grounds", {RA_CASTLE_GROUNDS}, NO_DAY_NIGHT_CYCLE, {}, {}, { | ||
| // | ||
| //Temporarily uses SCENE_OUTSIDE_GANONS_CASTLE to avoid self connection between ages | ||
| areaTable[RR_CASTLE_GROUNDS] = Region("Castle Grounds", SCENE_OUTSIDE_GANONS_CASTLE, TIME_DOESNT_PASS, {RA_CASTLE_GROUNDS}, {}, {}, { |
There was a problem hiding this comment.
is RA_CASTLE_GROUNDS still properly preserved to cover the interior-on-the-market-exit edge case?
* Change region scene from string to sceneid * Deduce `timePass` from scene * Deduce `areas` from scene where possible No possible for `RR_CASTLE_GROUNDS` & "link's pocket" areas * Update zoras_fountain.cpp * Applied clang format * Address review * Address review * Clang format * Fix pseudo regions * Format * Address review * Address review
Also deduces
timePass(andareaswhen possible) from the scene.Build Artifacts