Blizz-ABS Battle Music
Authors: Nathmatt
Version: 1.09
Type: Music changer
Key Term: Blizz-ABS Plugin
IntroductionChanges the music when you are targeted by an enemy
Features
- easy config just put the battle music you want in the config
- configurable fade out time
Screenshotsno screen shot needed
Demono demo
Script#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# BlizzABS Battle Music by Nathmatt
# Version: 1.09
# Type: Music changer
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
module Music_Change
def self.fade_out
return 1 # secounds of music fade
end
def self.Music
#RPG::AudioFile.new(name = "", volume = 100, pitch = 100)
return [RPG::AudioFile.new('001-Battle01')] # Array of musics
end
end
class Game_Map
def active?
return (battlers.find_all {|battler|battler.update? &&
battler.ai.target != nil})
end
end
class Scene_Map
alias music_change_update update
def update
if @map_id != $game_map.map_id
@battle_music = @normal_music = nil
@map_id = $game_map.map_id
end
@wait = 0 if @wait == nil
@wait -=1 if @wait > 0
if $game_map.active?.size > 0 && $game_map.battlers.size > 0
@wait = 40
if !@battle_music
@battle_music = true
@normal_music = false
@bgm = $game_system.playing_bgm
#"Audio/BGM/"
$game_system.bgm_play(Music_Change.Music[$game_player.music_type])
end
elsif @wait == 0 && @normal_music == false
@battle_music = false
@normal_music = true
if @bgm != nil
$game_system.bgm_play(@bgm)
else
$game_system.bgm_fade(1)
end
end
music_change_update
end
end
class Map_Actor
attr_accessor :music_type
alias battle_music_initialize initialize
def initialize(i)
battle_music_initialize(i)
@music_type = 0
end
end
class Game_System
attr_reader :playing_bgm
end
Instructionsadd the musics you want to the array of musics in the config
to change the music use $game_
player.music_type = index
index goes 0 for the first 1 1 for the secound ect...
place this script Below Blizz-ABS
Compatibilityrequires Blizz-ABS
Credits and Thanks
- Nathmatt
- Magus for requesting it
Author's Notesif you have any issues or suggestions post here