#==============================================================================
# Individual Troop BGM by PK8
#==============================================================================
class PK8
Troops_Theme = {} # Do not touch this.
#Troops_Theme[id] = ["Music File", Volume, Pitch]
#HERE!
end
class Spriteset_Battle
alias_method(:pk8_troops_theme_initialize, :initialize)
def initialize
pk8_troops_theme_initialize
start_troop_theme
end
def start_troop_theme
PK8::Troops_Theme.each_key { | i |
# If Troop ID equals the key.
if $game_temp.battle_troop_id == i
# If specified BGM isn't nil or empty.
if PK8::Troops_Theme[i][0] != nil and !PK8::Troops_Theme[i][0].empty?
# Sets BGM volume to 100 if nil.
PK8::Troops_Theme[i][1] = 100 if PK8::Troops_Theme[i][1] == nil
# Sets BGM pitch to 100 if nil.
PK8::Troops_Theme[i][2] = 100 if PK8::Troops_Theme[i][2] == nil
# Plays BGM.
Audio.bgm_play("Audio/BGM/#{PK8::Troops_Theme[i][0]}",
PK8::Troops_Theme[i][1], PK8::Troops_Theme[i][2])
end
break
end }
end
end