LAWS Menu Music
Version 2.0
The Law G14/TheScripter
10/11/09
Introduction
I already had this script over at RRR but I decided to bring it here as well. I saw a script like this before for vx by Sojabird and since I noticed that a lot of people seemed to like it, I made one for xp. Basically what it does is play a different music then the map music when you enter the menu. Hope you guys like it :)
Features
- Plays music in menu
- Plug n’ Play
- Can choose if you would like the BGM to be just the Map BGM except faded out a little (In Version 2.0)
Script
Script
Spoiler
- #------------------------------------------------------------------------------
- #==============================================================================
- #==============================================================================
- #=========================*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
Expand to see the code.
Compatibility
Will probably run into issues with scripts that edit the menu.
Installation
Customize your script at the top.
FAQ
None as of now.
Terms and Conditions
Please credit me where it is due.
Special Thanks
Special Thanks to Sojabird and his script for giving me the idea to do this script.
Thanks to Night Runner for Bug fixes as well as Redd for suggesting the idea on the faded Map BGM