Repository navigation
The Lake Hylia gate no longer opens by itself with dungeon rando - #145
Merged
Merged
Conversation
…are shuffled With "Shuffle Dungeon Entrances" on and the Water Temple behind another dungeon's door, entering the temple there opened the gate at the bottom of Lake Hylia on the next visit, without the hookshot switch, giving a free way into whatever dungeon sits behind that gate. The gate now stays shut until its switch is hit. ## Cause The gate (`Obj_LakeHrl_SwitchShutter_A_01`) is driven by `Logic/HyruleField_LakeHylia_Common_Prefab_6a9d.logic.module.ainb`, run by both ages' Hyrule Field maps. Its OR opens the gate on `HavePlayedEvent.Dm_WaterTemple_0000` or directly on the Water Sage quest (`SageOfWater`) being past Step05, and the same quest check also writes the flag (element 16). The Water Temple's door carries `SageOfWater_Arrival_WaterTemple`, which moves the quest to Step06, and the shuffle moves that event with the dungeon. In the vanilla game the temple can only be entered through the gate, so neither path shows. With the temple moved, entering it opens the gate. ## Change `randomizer/core/src/entr/lake.rs`, called from `entr::story::stage`. Only when the seed's layout moves the Water Temple away from its own spot, the lake module is rewritten in two places: element 16's drive input becomes constant false, and the gate OR's multi-input entry that read the quest step reads the flag instead. Nothing then reads the quest step. The gate opens only on the flag, which only the switch's scene sets, as in the vanilla game. The switch, the scene request and the pillar are untouched, and the Water Sage quest still moves to Step06 when the temple is entered. The game's logic already requires the Hookshot for the Water Temple spot. `entr.rs`, `entr/build.rs`, `entr/story.rs`: the module declaration, one build-report line and the call. With `shuffle_entrances` off the stage returns before reading anything. With the Water Temple in place nothing is staged. ## Checked - Regression tests in `lake.rs` (game files): the unfixed module has 2 readers of the quest check, the patched one 0. Only the two edits differ. The scene request is `AND(NOT flag, switch OnState)` before and after. With only the first edit, 2 of the 5 lake tests fail. - `cargo test --workspace`: 2433 passed, 0 failed, 13 ignored. - Default output byte-identical to nightly 240af8b: shuffle off 295 files identical. Dungeons shuffled with the Water Temple in place: 298 identical. With it moved, only the lake module differs. - In the game (scripted, same seed, fixed build and an unfixed control): entering the Water Temple by the Sacred Forest Meadow door leaves the flag 0 and the gate shut (the control opens it). Hookshotting the switch above the gate on the fixed build plays `Dm_WaterTemple_0000`, sets the flag and opens the gate, which stays open after a map reload and after a save reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With "Shuffle Dungeon Entrances" on and the Water Temple behind another dungeon's door, entering the temple there opened the gate at the bottom of Lake Hylia on the next visit, without the hookshot switch, giving a free way into whatever dungeon sits behind that gate. The gate now stays shut until its switch is hit.
Cause
The gate (
Obj_LakeHrl_SwitchShutter_A_01) is driven byLogic/HyruleField_LakeHylia_Common_Prefab_6a9d.logic.module.ainb, run by both ages' Hyrule Field maps. Its OR opens the gate onHavePlayedEvent.Dm_WaterTemple_0000or directly on the Water Sage quest (SageOfWater) being past Step05, and the same quest check also writes the flag (element 16). The Water Temple's door carriesSageOfWater_Arrival_WaterTemple, which moves the quest to Step06, and the shuffle moves that event with the dungeon. In the vanilla game the temple can only be entered through the gate, so neither path shows. With the temple moved, entering it opens the gate.Change
randomizer/core/src/entr/lake.rs, called fromentr::story::stage. Only when the seed's layout moves the Water Temple away from its own spot, the lake module is rewritten in two places: element 16's drive input becomes constant false, and the gate OR's multi-input entry that read the quest step reads the flag instead. Nothing then reads the quest step. The gate opens only on the flag, which only the switch's scene sets, as in the vanilla game. The switch, the scene request and the pillar are untouched, and the Water Sage quest still moves to Step06 when the temple is entered. The game's logic already requires the Hookshot for the Water Temple spot.entr.rs,entr/build.rs,entr/story.rs: the module declaration, one build-report line and the call. Withshuffle_entrancesoff the stage returns before reading anything. With the Water Temple in place nothing is staged.Checked
lake.rs(game files): the unfixed module has 2 readers of the quest check, the patched one 0. Only the two edits differ. The scene request isAND(NOT flag, switch OnState)before and after. With only the first edit, 2 of the 5 lake tests fail.cargo test --workspace: 2433 passed, 0 failed, 13 ignored.Dm_WaterTemple_0000, sets the flag and opens the gate, which stays open after a map reload and after a save reload.