Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Continuing Dramatic Music

Alright, this requires a bit of explanation and examples.  You know how in Final Fantasy 7 when the opening bombing mission occurs right at the beginning of the game and the dramatic music plays, regardless of whether you're in or outside of battle?  That.  I want to know how or if there's a way to make that happen.  In other words, I would like to have, say, a chase scene in my game where sometimes the aggressors catch up with you and there's a battle, but the out of battle/field music keeps playing with no pauses, no skips, no startovers.

Also, is there a way to make the field music resume it's previous position when exiting a battle?  In other words, let's say, for whatever reason, the field music is Green Day's ridiculous 8 minute song (I say ridiculous because of the length, not because it's bad or whatever).  Let's say I'm 1:30 into the song, then I enter battle.  Well, normally, when I exit battle, it would start over.  Is there a way to make it start at the 1:30 point instead?  Sorry if I'm asking for too much, but these are things I've always wondered about the system.
 
I'm not sure, but i'll take a wild guess. What if you change the battle BGM in your event commands, when you first start the game(the map, where that'll begin), to whatever field music is playing. Try that...Does that make sense? If not, I'll explain more.
 
I'll give it a shot when I get home.  Will that continue the music or is that the function to override the normal calls to battle music?  I'll certainly try it out with a test program when I get home.
 
Okay, good news and bad news.  First what I tried was this...

Battle BGM - Battle01
Map properties BGM - Battle01

I modified nothing else.  The game starts off with the battle01 music because it's the only map.  I threw an NPC encounter in there.  The battle loads, but since it plays the SE for the battle start, it kills the music, then starts it over.  The good news?  Well, after the battle ended, it kept playing the music.  Okay, so I tried eliminating the SEs and trying again.  Same deal, just no SEs.  Alright, just in case...I tried also eliminating the battle BGM.  Same deal.  So the good news is it seems like if the battle and map BGM are the same, it will continue on after battle, but it starts over for every battle.

I'm going to try this for continuation, but I don't think it's going to work.

Edit:  I tried it.  The music doesn't continue, it just starts over.  I think I may need a script, though, if there's a way to make this work via events, that might be better.
 
Ok, I have another crappy idea.  :lol:

What if in your troops tab, you see how you can add events? Well, before you enter your battle, add the memorize BGM event command. Then, go to the troops tab in your database, and try putting the event command called restore BGM. Maby that'll work.

EDIT: Yeah, i tried it, and it doesn't work. I can't promise anything, but i'll try and figure out how to fix this.
 
Ok, I actually figured this out. Edit the method call_battle in the Scene_Map class.  Put this code in a new script section above main.

Code:
Scene_Map
  def call_battle
    $game_temp.battle_calling = false
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    $game_player.make_encounter_count
    $game_temp.map_bgm = $game_system.playing_bgm
    if !$game_switches[10] # Change 10 to the switch for keeping current music
      $game_system.bgm_stop
    end
    $game_system.se_play($data_system.battle_start_se)
    if !$game_switches[10] # Change 10 to the switch for keeping current music
      $game_system.bgm_play($game_system.battle_bgm)
    end
    $game_player.straighten
    $scene = Scene_Battle.new
  end
end

Change 10 in the code above to whatever switch # you want to keep the BGM.

After inserting the script, set the switch you chose to ON before the battle starts. Then set it to OFF after the battle is over.

Good luck.  :thumb:
 
Okay and this should continue playing the music or will it pick up where it left off?  Thank you for the script, by the way.  I'm going to check it out when I get home.
 
Yes, this is exactly what you want. You just turn on the switch before your battle, then when the battle is done, turn the switch off. Just do this anytime you want the music to continue and not stop in battle.

Be well.  :thumb:
 
Awesome!  As far as continuing music that plays through battle, that works great.  Now I just need to figure out how to resume a track of music after battle, not start it over.  Thank you!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top