Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
- # Random Battle BGM
- # Version: IN DEVELOPMENT
- # Author: Adon237
- # Website: adonkadonk.blogspot.com
- # Date of Creation: Sunday, June 9, 2013
- # Last Update Time: Sunday, June 9, 2013
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
- # Description:
- # I for one am tired of hearing the same BGM play during battles. Even the best
- # pieces can only hold my interest for so long, before it becomes monotonous.
- # This script won't rid you of that problem, but it will definitely stall the
- # process.
- # This script's function is to play a random BGM of a set of your choosing.
- # There is no outside influence besides the ADON237_SPECIAL_BATTLE_SWITCH that will
- # prevent the random BGM from playing.
- # Just modify the array based on the instructions and you will be good to go!
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
- class Scene_Map < Scene_Base
- # The switch that if ON, will stop the Random BGM from playing.
- # This is particularly useful for boss battles with special BGMS.
- ADON237_SPECIAL_BATTLE_SWITCH = 6
- A_BGMS = [ # do not modify this line
- # Here is where you add the bgms
- # If you want to add a bgm to the set, just enter in a new line exactly how you see it here
- # [ "bgmfileinquoteswithoutextension", volume, pitch],
- [ "99-Airy_Edge_Atelier_Lucid", 100, 100], # possible bgm 1
- [ "99-Guitar Battle", 100, 100], # possible bgm 2
- [ "99-Heroic Battle", 100, 100], # possible bgm 3
- [ "99-Valiance", 100, 100], # possible bgm 4
- #XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#
- # DO NOT TOUCH PAST THIS POINT DO NOT TOUCH PAST THIS POINT DO NOT TOUCH PAST TH
- #XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#
- # STOP IT YOU MIGHT RUIN THE SCRIPT I DO NOT WANNA WASTE TIME HELPING YOU NOOOO
- #XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#
- ] # DO NOT TOUCH PAST THIS POINT DO NOT TOUCH PAST THIS POINT DO NOT TOUCH PA
- #XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#
- # SERIOUSLY WHY ARE YOU NOT LISTENING TO ME?! DO NOT TOUCH NO TOUCHIE ZERO NADA
- #XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#
- # HEED MY WARNING DO NOT GO PAST HERE THE BEAST IS WAITING TO KILL YOU
- #XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#
- alias adon_random_bgms pre_battle_scene
- def pre_battle_scene
- unless $game_switches[ADON237_SPECIAL_BATTLE_SWITCH]
- Graphics.update
- Graphics.freeze
- @spriteset.dispose_characters
- BattleManager.save_bgm_and_bgs
- # random processing
- @rbgm = rand(A_BGMS.size)
- # play the bgm
- Audio.bgm_play("Audio/BGM/" + A_BGMS[@rbgm][0], 100, A_BGMS[@rbgm][2])
- Sound.play_battle_start
- else
- adon_random_bgms
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement