Level Up ME & SE ACE
by Kyonides
by Kyonides
Introduction
Here you can find 2 scriptlets that will let you either change the ME that should be played right after winning the battle or play a short SE for every actor that did level up then.
Both have something in common: the LVL_UP_SOMETHING_SETUP constant where SOMETHING stands for either ME or SE.
It is an array that needs 3 values: the "Filename", the Volume, and the Pitch.
The rest of the process is taken care of by the scripts themselves. Now just win the battle and you'll be listening to them in no time. :ewink:
The Level Up ME Script
Ruby:
# * Level Up ME ACE * #
# 2024-01-23
class << BattleManager
LVL_UP_ME_SETUP = ["Victory2", 80, 100]
LVL_UP_ME = RPG::ME.new(*LVL_UP_ME_SETUP)
alias :kyon_lvl_up_me_play_btl_proc_vict :process_victory
def play_battle_end_me
@level_up_flag ? LVL_UP_ME.play : $game_system.battle_end_me.play
@level_up_flag = nil
end
def test_gain_exp
exp = $game_troop.exp_total
lvl_up = $game_party.all_members.map {|actor| actor.test_change_exp(exp) }
@level_up_flag = lvl_up.any?
end
def process_victory
test_gain_exp
kyon_lvl_up_me_play_btl_proc_vict
end
end
class Game_Actor
def test_change_exp(exp)
last_exp = @exp[@class_id]
@exp[@class_id] = [exp, 0].max
last_level = @level
level_up while !max_level? && self.exp >= next_level_exp
next_level = @level
level_down until @level == last_level
@exp[@class_id] = last_exp
next_level > last_level
end
end
The Level Up SE Script
Ruby:
# * Level Up SE ACE * #
# 2024-01-23
class Game_Actor
# Arguments Order: ["Filename", Volume, Pitch]
LVL_UP_SE_SETUP = ["Chime2", 80, 100]
LVL_UP_SE = RPG::SE.new(*LVL_UP_SE_SETUP)
alias :kyon_lvl_up_se_gm_act_dis_lvl_up :display_level_up
def display_level_up(new_skills)
LVL_UP_SE.play
kyon_lvl_up_se_gm_act_dis_lvl_up(new_skills)
end
end
Terms & Conditions
Well, they're nothing but short scripts so I don't mind letting people use them for free.
Just include me in your game credits and that's it! 😛