• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

How to make Bicycle Music and Surf Music fade on map transition

In Pokemon games, the music for the Bike and Surf would fade to the music for the new location you transitioned into. In Essentials-made games, it doesn't do that. How to do it is a simple and quick tweak of the scripts.
In [PokemonField], do a search for the following lines:
Code:
  if $PokemonGlobal.surfing && surfbgm
    pbBGMPlay(surfbgm)
  elsif $PokemonGlobal.bicycle && bikebgm
    pbBGMPlay(bikebgm)
  else
    $game_map.autoplayAsCue
  end
end
It should be in the section "def pbAutoplayOnTransition" Where it says pbBGMPLay(surfbgm) and pbBGMPlay(bikebgm), either comment or delete it, and replace it with $game_map.autoplayAsCue. When that's finished, your section should look like this:
Code:
  if $PokemonGlobal.surfing && surfbgm
    $game_map.autoplayAsCue
  elsif $PokemonGlobal.bicycle && bikebgm
    $game_map.autoplayAsCue
  else
    $game_map.autoplayAsCue
  end
end
Granted, there's probably an easier way to do it, but this was how I handled it.
You'll also want to do the same to the section below it, labeled with "def pbAutoplayOnSave", this will make it so it doesn't keep the music running when you reload the map after a save.
Hopefully this helps people out, I don't need credit for this at all. Here's hoping this inspires somebody to optimize it maybe!
 
True, but Bicycle Music is. I think I got the two mixed up - was convinced that surfing music was also disabled between map transitions. My mistake on that part! Still, in case people want to have the surf bgm disabled on transitions/reloads, this will work for them.
 
In Pokemon games, the music for the Bike and Surf would fade to the music for the new location you transitioned into. In Essentials-made games, it doesn't do that. How to do it is a simple and quick tweak of the scripts.
In [PokemonField], do a search for the following lines:
Code:
  if $PokemonGlobal.surfing && surfbgm
    pbBGMPlay(surfbgm)
  elsif $PokemonGlobal.bicycle && bikebgm
    pbBGMPlay(bikebgm)
  else
    $game_map.autoplayAsCue
  end
end
It should be in the section "def pbAutoplayOnTransition" Where it says pbBGMPLay(surfbgm) and pbBGMPlay(bikebgm), either comment or delete it, and replace it with $game_map.autoplayAsCue. When that's finished, your section should look like this:
Code:
  if $PokemonGlobal.surfing && surfbgm
    $game_map.autoplayAsCue
  elsif $PokemonGlobal.bicycle && bikebgm
    $game_map.autoplayAsCue
  else
    $game_map.autoplayAsCue
  end
end
Granted, there's probably an easier way to do it, but this was how I handled it.
You'll also want to do the same to the section below it, labeled with "def pbAutoplayOnSave", this will make it so it doesn't keep the music running when you reload the map after a save.
Hopefully this helps people out, I don't need credit for this at all. Here's hoping this inspires somebody to optimize it maybe!

I'm aware this post is 6 years old but when I try and change the script to what you put it causes an error crash... any idea why?
 
My best guess is that the code was changed between then and now; I haven't looked at the Surf or Bike BGM code since I made those changes.
 
Back
Top