Okay, so I treid to do this using common events, but, I can't seem to figure it out, without the game freezing on me.. I just want the game to check if you leveld up, and if so, to refill your health and mana/majick/whatever. That's all. No fancy menus or ABS systems that incorporate it.. I might be able to find it in the Blizz-ABS, so I'll update if I solve it, but, I dunno yet... Thanks in advance :)
Did you ask this somewhere else?
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Change EXP
# exp : new EXP
# Add All Heal on Level up - Brew
#--------------------------------------------------------------------------
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
#heal
@hp = self.maxhp
@sp = self.maxsp
end
# Level down
while @exp < @exp_list[@level]
@level -= 1
end
# Correction if exceeding current max HP and max SP
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
end
No, I didn't, but thank you very much :haha:
weird, I just answered this recently.
BTW, It took me a little while to figure out how to alias a 'setter' method, but this is a little cleaner & will prevent incompatibility...
class Game_Actor
alias :old_exp= :exp=
def exp=(exp)
oldlvl = @level
self.old_exp = exp
if @level > oldlvl
@hp = self.maxhp
@sp = self.maxsp
end
end
end
class Game_Actor
alias recover_level_up level=
def level=(level)
if level > @level
@hp, @sp = self.maxhp, self.maxsp
end
recover_level_up(level)
end
end
This will eliminate the creation of an unneeded local variable.
pretty sure the add-on is already in Blizz-ABS. If you're not using Blizz-ABS its in Tons of Add-Ons
Thank you to everyone that responded :)