Hi, I made a post about this a couple of days ago, but It was a lot of rambling and suppositions, I've tested much more things and now I have a new perspective on the issue, that's why I'm making a new one.
First of all, I'm using a custom lvl formula for an actor, with this script(Actor Mod Formulas) along with YEA Class System, my exact problem is that the class system, uses the lvl formula of the classes in the database and not the custom one I'm using for the actor, this is just for the text showing the class levels though, because after changing classes it gives me the right level specified by my lvl formula. In other words, it's a visual problem.
I've found the part of Yanfly's code where this happens, lines 608 to 635:
The exact part I think I should modify is near the end, where the loop starts. What I understand(sort of) is that, when changing classes, if the exp stored on the temp class is enough to lvl up according to the database class lvl formula, it sums up a lvl and continue to do that until it isn't enough exp to lvl up.
What I don't know how to do, and hopefully will correct this issue, is how do I change the condition to use my lvl formula instead of the database ones?
The custom lvl formula I'm using for the actor is this one: ((((level-1)*4)**2) + (level-1)*500).round.to_i
I would appreciate any help on the matter as I've tested some things but I can't manage to achieve it.
First of all, I'm using a custom lvl formula for an actor, with this script(Actor Mod Formulas) along with YEA Class System, my exact problem is that the class system, uses the lvl formula of the classes in the database and not the custom one I'm using for the actor, this is just for the text showing the class levels though, because after changing classes it gives me the right level specified by my lvl formula. In other words, it's a visual problem.
I've found the part of Yanfly's code where this happens, lines 608 to 635:
#————————————————————————–
# new method: class_level Edited by DisturbedInside
#————————————————————————–
def class_level(class_id)
return @level if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
temp_class = $data_classes[class_id]
@exp[class_id] = 0 if @exp[class_id].nil?
#declare a max level (using EXP)
#If you can’t find it, go to the class database and select exp curve
#then switch view to total at the top
@exp[max_level] = 2547133 #This is the value to change. It declares a max level
#You need to calculate how much exp for max level
#Do it manually if using Yanfly-Adjusting Limits
#To calculate max level exp if using Yanfly-adjusting limits is all math!!
# Level 99 = 2547133
# to calculate past there…. have to add on multiples of 50744
# Level 110 = 3156061
# To go from 99 -> 110 have to add on 12 multiples of 50744.
n = 1
loop do
break if temp_class.exp_for_level(n+1) > @exp[class_id]
n += 1
#add a restriction to “kick out” of loop if exp exceeds max level exp
break if temp_class.exp_for_level(n+1) > @exp[max_level]
end
return n
end
# new method: class_level Edited by DisturbedInside
#————————————————————————–
def class_level(class_id)
return @level if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
temp_class = $data_classes[class_id]
@exp[class_id] = 0 if @exp[class_id].nil?
#declare a max level (using EXP)
#If you can’t find it, go to the class database and select exp curve
#then switch view to total at the top
@exp[max_level] = 2547133 #This is the value to change. It declares a max level
#You need to calculate how much exp for max level
#Do it manually if using Yanfly-Adjusting Limits
#To calculate max level exp if using Yanfly-adjusting limits is all math!!
# Level 99 = 2547133
# to calculate past there…. have to add on multiples of 50744
# Level 110 = 3156061
# To go from 99 -> 110 have to add on 12 multiples of 50744.
n = 1
loop do
break if temp_class.exp_for_level(n+1) > @exp[class_id]
n += 1
#add a restriction to “kick out” of loop if exp exceeds max level exp
break if temp_class.exp_for_level(n+1) > @exp[max_level]
end
return n
end
The exact part I think I should modify is near the end, where the loop starts. What I understand(sort of) is that, when changing classes, if the exp stored on the temp class is enough to lvl up according to the database class lvl formula, it sums up a lvl and continue to do that until it isn't enough exp to lvl up.
What I don't know how to do, and hopefully will correct this issue, is how do I change the condition to use my lvl formula instead of the database ones?
The custom lvl formula I'm using for the actor is this one: ((((level-1)*4)**2) + (level-1)*500).round.to_i
I would appreciate any help on the matter as I've tested some things but I can't manage to achieve it.