[rgss]#------------------------------------------------------------------------------
#==============================================================================
#==============================================================================
#=========================*Law's Menu Music*===================================
#=========================Author: The Law G14==================================
#===================Original VX script by Sojabird=============================
#=======================Bug fixes by Night Runner==============================
#============================Version 2.0=======================================
#==============================================================================
#------------------------------------------------------------------------------
#==============================================================================
# ** Music_Custom [CUSTOMIZATION WITHIN THIS MODULE]
#------------------------------------------------------------------------------
# This module contains the main customization within the script
#==============================================================================
module Music_Custom
# Fade Map Music (If true, the menu music will be a softer verision of the
# map music
Fade_Map_BGM = true
# Set the file of the BGM for the Menu Music
File = "Audio/BGM/001-Battle01"
end
#===============================================================================
# ** Scene_Menu
#-------------------------------------------------------------------------------
# This class performs menu screen processing.
#===============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
alias law_music_scene_menu_initialize initialize
alias law_music_scene_menu_main main
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(*args)
if Music_Custom::Fade_Map_BGM
# Dim down volume of bgm when entering menu
$game_system.playing_bgm.volume = 50
$game_system.bgm_play($game_system.bgm_memorize)
else
Audio.bgm_play(Music_Custom::File, 100, 100)
end
# Call original method
return law_music_scene_menu_initialize(*args)
end
#-----------------------------------------------------------------------------
# * Main
#-----------------------------------------------------------------------------
def main
# Call original method
law_music_scene_menu_main
if Music_Custom::Fade_Map_BGM
# If scene is equal to default, restore bgm to original method
$game_system.playing_bgm.volume = 100 if $scene.is_a?(Scene_Map)
$game_system.bgm_play($game_system.bgm_memorize)
else
$game_system.bgm_restore if $scene.is_a? Scene_Map
end
end
end
#===============================================================================
# ** Scene_Item
#-------------------------------------------------------------------------------
# This class performs item screen processing.
#===============================================================================
class Scene_Item
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
alias law_music_scene_item_main main
#-----------------------------------------------------------------------------
# * Update Command
#-----------------------------------------------------------------------------
def main
# Call original method
law_music_scene_item_main
if Music_Custom::Fade_Map_BGM
# If scene is back to map, restore volume to default
$game_system.playing_bgm.volume = 100 if $scene.is_a?(Scene_Map)
$game_system.bgm_play($game_system.bgm_memorize)
else
$game_system.bgm_restore if $scene.is_a? Scene_Map
end
end
end
[/rgss]