Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
Leon

BGM toggle for battle.

Recommended Posts

Ok, I guess you can call this a fix for RmXP, if you want. With this script, you can use a switch to toggle on and off if the background music plays through the battle. It is really good for those 'dramatic' scenes like in Final Fantasy X. Basically, you turn on the switch for the battle, then turn it off after the battle. Simple, no? Anyway, you can even customize which switch is used for the script. here it is (instructions in the script, please read them.)

 

#===================================
#  Leon's battle BGM Fix
#----------------------------------------------------------------------
#  Feature:
#	You can turn off the battle music for battles, and let the
#	bgm play through.  It will only be interupted by the music
#	effect of battle, then the music fades back in.
#
#  Instructions:
#	Place after Scene_Debug, but before Main
#	set SWITCH_TO_BYPASS equal to the switch that needs
#	to be on for this to work.  So, if SWITCH_TO_BYPASS equalled 1,
#	and switch 1 is on, the BGM plays through battle.  When switch
#	1 is off, it will turn on the battle background music.
#===================================
class Scene_Map
 alias leon_bgmfix_scenemap_callbattle call_battle
 SWITCH_TO_BYPASS = 8

 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
unless $game_switches[SWITCH_TO_BYPASS] == true
  $game_system.bgm_stop
  $game_system.se_play($data_system.battle_start_se)
  $game_system.bgm_play($game_system.battle_bgm)
end
$game_player.straighten
$scene = Scene_Battle.new
 end
end

Share this post


Link to post
Share on other sites

So it lets the BGM play through the battle screen without being cut off by a separate battle BGM? Awsome.

Share this post


Link to post
Share on other sites

This would be handy for my arena in my game. That way it doesn't keep restarting the BGM every time a battle starts, as the arena and the battles all have the same music.

Share this post


Link to post
Share on other sites

finally I got the chance to ask this, how do you let the SE play while this script is active? I tested the effects of this script and the SE that usually plays upon entering battle doesn't play.

Share this post


Link to post
Share on other sites
finally I got the chance to ask this, how do you let the SE play while this script is active? I tested the effects of this script and the SE that usually plays upon entering battle doesn't play.

 

I purposely did that, but

Try this one for yours:

#===================================
#  Leon's battle BGM Fix
#----------------------------------------------------------------------
#  Feature:
#	You can turn off the battle music for battles, and let the
#	bgm play through.  It will only be interupted by the music
#	effect of battle, then the music fades back in.
#
#  Instructions:
#	Place after Scene_Debug, but before Main
#	set SWITCH_TO_BYPASS equal to the switch that needs
#	to be on for this to work.  So, if SWITCH_TO_BYPASS equalled 1,
#	and switch 1 is on, the BGM plays through battle.  When switch
#	1 is off, it will turn on the battle background music.
#===================================
class Scene_Map
 alias leon_bgmfix_scenemap_callbattle call_battle
 SWITCH_TO_BYPASS = 8

 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
  $game_system.se_play($data_system.battle_start_se)
unless $game_switches[SWITCH_TO_BYPASS] == true
  $game_system.bgm_stop
  $game_system.bgm_play($game_system.battle_bgm)
end
$game_player.straighten
$scene = Scene_Battle.new
 end
end

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...