From 8e48bb4e322088a5ebbe1286625afac7e08a5f14 Mon Sep 17 00:00:00 2001 From: thibautbus <310327033+thibautbus@users.noreply.github.com> Date: Tue, 11 Aug 2026 12:07:07 +0200 Subject: [PATCH] Play the museum-guy cue during Oak's lab walk in Yellow Yellow's Pallet Town intro (professor catches the wild Pikachu, then walks the player to the lab) played the map's default Pallet Town theme the whole time instead of the dedicated escort cue. Per pokeyellow's actual scripts: PlayDefaultMusicFadeOutCurrent (run on every battle exit) legitimately restores Pallet Town's theme after the Pikachu demo battle for the Whew.../Come with me lines; the escort cue (MUSIC_MUSEUM_GUY, the same "led by an NPC" theme Pewter's museum guide uses) only starts in PalletMovementScript_OakMoveLeft, the first function of the escort script -- but only in pokeyellow's copy. pokered's copy of that same shared Red/Yellow function only sets BIT_NO_MAP_MUSIC and leaves whatever was already playing (MUSIC_MEET_PROF_OAK) running uninterrupted into the lab. Start Music_MuseumGuy at the top of escortToLab, gated on Yellow so Red/Blue keeps its unchanged behavior, and fix the Oak-escort warp's keepMusic comment to say which song rides the warp in each version. --- data/scripts/story2.lua | 13 +++++++++++++ src/world/OverworldController.lua | 9 ++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/data/scripts/story2.lua b/data/scripts/story2.lua index b7e40f3d..958ba2a2 100644 --- a/data/scripts/story2.lua +++ b/data/scripts/story2.lua @@ -206,6 +206,19 @@ M.PALLET_TOWN = { end local function escortToLab(oak) + -- PalletMovementScript_OakMoveLeft (engine/overworld/auto_movement + -- .asm) is shared by Red and Yellow, but only Yellow's copy starts + -- MUSIC_MUSEUM_GUY there (the instant the movement script is + -- armed, before Oak or the player takes a single step); pokered's + -- copy only sets BIT_NO_MAP_MUSIC and leaves whatever was already + -- playing (MUSIC_MEET_PROF_OAK, started when Oak first appears) + -- running uninterrupted all the way into the lab. Until Yellow's + -- switch fires (including the Whew.../Come with me lines right + -- after the Pikachu battle) the map's default Pallet Town theme + -- plays, restored by the battle's own exit path. + if yellow then + Music.play(game.data, "Music_MuseumGuy") + end local numSteps = x - 10 if oak and numSteps > 0 then ow:scriptMove(oak, "left", numSteps, function() diff --git a/src/world/OverworldController.lua b/src/world/OverworldController.lua index a345ba6c..9330f879 100644 --- a/src/world/OverworldController.lua +++ b/src/world/OverworldController.lua @@ -453,9 +453,12 @@ function OverworldState:setMap(mapId, x, y, facing, opts) -- walks out of the warp, not beside him (#863) require("src.world.PikachuFollower").onMapEntered(Game, self, opts, true) - -- opts.keepMusic: the Oak-escort warp keeps MUSIC_MEET_PROF_OAK - -- playing into the lab (BIT_NO_MAP_MUSIC in wStatusFlags7); - -- keepMusicOnce is the play_music opts.keep one-shot of the same bit + -- opts.keepMusic: the Oak-escort warp keeps whatever cutscene song is + -- already playing going into the lab instead of cutting to it + -- (BIT_NO_MAP_MUSIC in wStatusFlags7) -- MUSIC_MUSEUM_GUY in Yellow + -- (started in escortToLab when Oak begins walking), MUSIC_MEET_PROF_OAK + -- in Red/Blue (pokered never switches songs for this walk); keepMusicOnce + -- is the play_music opts.keep one-shot of the same bit local keepMusic = (opts and opts.keepMusic) or self.keepMusicOnce self.keepMusicOnce = nil if not keepMusic then