The Mods tab's map reload can start a story event #3148

Closed
opened 2026-12-04 01:52:46 +00:00 by HumanBean · 1 comment
Owner

What happens

Reload the map to see the change (the Mods tab's first line after a mod's file changes while the game runs) can start a story event, and then does not put Link back.

The reload (game/crates/api/src/services/reload.rs) re-enters the map through its destination's entrance, the way the Debug tab's teleport does, and moves Link back afterwards. Whatever the game plays on arriving there plays first.

Seen

One headless run on Linux (NVIDIA RTX 3090), on a throwaway copy of the kokiri-start repository save, with a file mod switched on in Kokiri Forest:

mods: the Mods tab reloads the map
mods: the reload of the map KokiriForest_Child: asked (Link at -46.09 118.44 15.39)
cheats: teleport child to KokiriForest_Child at LostWoodBridge_FrontOfHyruleField (boot Dm_SY_BancChangeArrive, ...)
[warn] mods: the reload of the map KokiriForest_Child: not made: Link was not in play after the load

Arriving at the bridge started the cutscene where Link is given the Fairy Ocarina. The effect on a real save has not been checked, but a story event firing could advance it.

docs/modding/dev.md marks the reload as Preview, not yet tried in a game run.

What would fix it

Loading the area again with Link where he stands, with no entrance or arrival event. No such map change is known yet: it needs looking into the game's own map change (game_core::travel).

A follow-up change stops offering the reload outside mod development mode (the change then shows when the area next loads). This issue is for bringing back a reload that is safe on real saves.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e1rSeTzGtqzZNG1YZH

## What happens **Reload the map to see the change** (the Mods tab's first line after a mod's file changes while the game runs) can start a story event, and then does not put Link back. The reload (`game/crates/api/src/services/reload.rs`) re-enters the map through its destination's entrance, the way the Debug tab's teleport does, and moves Link back afterwards. Whatever the game plays on arriving there plays first. ## Seen One headless run on Linux (NVIDIA RTX 3090), on a throwaway copy of the `kokiri-start` repository save, with a file mod switched on in Kokiri Forest: ``` mods: the Mods tab reloads the map mods: the reload of the map KokiriForest_Child: asked (Link at -46.09 118.44 15.39) cheats: teleport child to KokiriForest_Child at LostWoodBridge_FrontOfHyruleField (boot Dm_SY_BancChangeArrive, ...) [warn] mods: the reload of the map KokiriForest_Child: not made: Link was not in play after the load ``` Arriving at the bridge started the cutscene where Link is given the Fairy Ocarina. The effect on a real save has not been checked, but a story event firing could advance it. `docs/modding/dev.md` marks the reload as Preview, not yet tried in a game run. ## What would fix it Loading the area again with Link where he stands, with no entrance or arrival event. No such map change is known yet: it needs looking into the game's own map change (`game_core::travel`). A follow-up change stops offering the reload outside mod development mode (the change then shows when the area next loads). This issue is for bringing back a reload that is safe on real saves. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e1rSeTzGtqzZNG1YZH
Member

Checked: this looks like a valid bug, and its cause is visible in the code.

The reload re-enters Kokiri Forest through the bridge entrance with an arrival event, then waits until Link is in play before moving him back. If he remains out of play long enough, it gives up without restoring his position. The code supports the reported failure mechanism, though I could not independently verify the specific Fairy Ocarina cutscene or whether it advances a real save.


For maintainers

Code inspected: game/crates/api/src/services/reload.rs documents entering via the destination's start before moving Link back; start gets the destination and calls game.travel(index). Its Game::travel contract says the map change is made through the game's travel queue. The report's docs/modding/dev.md reference says the feature is Preview/not tried in a game run. No version/channel or driver version was provided.

The current checkout still uses the entrance-based teleport path; the reported follow-up restricting the offer is not present in the reload service. The travel module documents the existing event-based map change at game/crates/game-core/src/travel.rs:5; I did not find an established entrance-free reload path.

Seen in the code:

  • game/crates/api/src/services/reload.rs:263 saves Link’s position, selects the current map’s destination and requests travel; line 411 sends that request through the teleport queue.
  • game/crates/game-core/src/travel.rs:160 assigns the child Kokiri Forest destination to the reported bridge entrance and arrival event; line 656 passes the destination’s arrival event as BootEventName.
  • game/crates/api/src/services/reload.rs:331 waits for the map load before attempting to place Link; line 346 gives up if he remains out of play for the configured period.
  • game/crates/api/src/services/reload.rs:179 still offers the reload in the Mods tab outside dev mode and starts it automatically in dev mode.
  • docs/modding/dev.md:127 describes the reload as Preview. Git blame attributes the reload path and destination entry to d984fd704; the reload file has no later commits in this checkout.

Automated triage by BeanBot (gpt-6-luna). Nothing was run; a maintainer decides.

**Checked: this looks like a valid bug**, and its cause is visible in the code. The reload re-enters Kokiri Forest through the bridge entrance with an arrival event, then waits until Link is in play before moving him back. If he remains out of play long enough, it gives up without restoring his position. The code supports the reported failure mechanism, though I could not independently verify the specific Fairy Ocarina cutscene or whether it advances a real save. --- **For maintainers** Code inspected: `game/crates/api/src/services/reload.rs` documents entering via the destination's start before moving Link back; `start` gets the destination and calls `game.travel(index)`. Its `Game::travel` contract says the map change is made through the game's travel queue. The report's `docs/modding/dev.md` reference says the feature is Preview/not tried in a game run. No version/channel or driver version was provided. The current checkout still uses the entrance-based teleport path; the reported follow-up restricting the offer is not present in the reload service. The travel module documents the existing event-based map change at game/crates/game-core/src/travel.rs:5; I did not find an established entrance-free reload path. Seen in the code: - game/crates/api/src/services/reload.rs:263 saves Link’s position, selects the current map’s destination and requests travel; line 411 sends that request through the teleport queue. - game/crates/game-core/src/travel.rs:160 assigns the child Kokiri Forest destination to the reported bridge entrance and arrival event; line 656 passes the destination’s arrival event as BootEventName. - game/crates/api/src/services/reload.rs:331 waits for the map load before attempting to place Link; line 346 gives up if he remains out of play for the configured period. - game/crates/api/src/services/reload.rs:179 still offers the reload in the Mods tab outside dev mode and starts it automatically in dev mode. - docs/modding/dev.md:127 describes the reload as Preview. Git blame attributes the reload path and destination entry to d984fd704; the reload file has no later commits in this checkout. --- <sub>Automated triage by BeanBot (gpt-6-luna). Nothing was run; a maintainer decides.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot#3148
No description provided.