Skip to content

Let the Song of Time play out before the age shift - #7058

Open
bassdr wants to merge 1 commit into
HarbourMasters:developfrom
bassdr:enhancement/time-travel-effect
Open

Let the Song of Time play out before the age shift#7058
bassdr wants to merge 1 commit into
HarbourMasters:developfrom
bassdr:enhancement/time-travel-effect

Conversation

@bassdr

@bassdr bassdr commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What

With Time Travel with Song of Time enabled, playing the Song of Time away from a Time Block switched Link's age the instant the song was recognised: the performance was cut off mid-phrase and the world swapped with no transition (SwitchAge() leaves TRANS_TYPE_INSTANT behind). Now the song finishes first and the era changes behind a white fade.

Nothing else moves: the same requirements gate it, the same nearby sources take precedence (Time Blocks, empty warp blocks, staff spots, the Door of Time, the frogs, Gossip Stones), and Link still respawns where he stood. No new CVar.

How

OnOcarinaSongAction fires while the fanfare is still playing, so it now only arms the change. An OnGameFrameUpdate poll waits for the fanfare player to stop running NA_BGM_OCA_TIME before calling SwitchAge() - there is no sequence-finished hook to listen on, and a frame countdown would just be a magic number. One bool test per frame while nothing is pending, and the hook is only registered while the enhancement is on.

The transition borrows what the Sun's Song uses for a time-of-day change (z_parameter.c, the sunsSongState block): TRANS_TYPE_FADE_WHITE_FAST out, TRANS_TYPE_FADE_WHITE in, haltAllActors. Audio is left alone; the scene load ends the song the same way it does for the Sun's Song.

Eligibility moved into a TimeTravelApplies() helper so arming and shift cannot drift apart.

Testing

  • Song of Time away from any source: plays in full, white fade, other era, Link where he stood
  • Near a Time Block, empty warp block, staff spot, Door of Time, frogs, Gossip Stone: those still take the song, no age change
  • Each requirement setting (Any Ocarina / + Master Sword / Ocarina of Time / + Master Sword) still gates the shift
  • Indoors and outdoors, and in a scene with a Time Block present but out of range

Build Artifacts

@bassdr
bassdr force-pushed the enhancement/time-travel-effect branch from 9e31bf5 to a7d215e Compare August 17, 2026 13:37
Time Travel switched Link's age the moment the song was recognised, cutting the
performance short and swapping the world with no transition at all. Wait for the
song to finish, then fade to white the way the Sun's Song changes the time of day.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F6N8EuNcBrfvM35N6fMG3t
@bassdr
bassdr force-pushed the enhancement/time-travel-effect branch from a7d215e to eb4dfc3 Compare August 18, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant