No worries. It's technically not using a status effect/state to not gain experience, it's just using the code where that takes place. I was actually messing around with it and it's also not complete - if the characters gain a large sum of XP at once (enough for more than one level) it can bypass the soft cap (and actually, it would only effect manual level changes, not through gained XP). Of course since you want to change the max level for each character, that's a little different and you should disregard the above code altogether. What you should use is this:
class Game_Actor < Game_Battler
attr_reader :final_level # final level
alias old_setup_soft_cap setup
def setup(actor_id)
old_setup_soft_cap(actor_id)
actor = $data_actors[actor_id]
@final_level = actor.final_level
end
def final_level=(final)
@final_level = final
# automatically adjust level when cap is lifted
self.exp+=0
end
#--------------------------------------------------------------------------
# * Change Level
# level : new level
#--------------------------------------------------------------------------
def level=(level)
# Check up and down limits
level = [[level, @final_level].min, 1].max
# Change EXP
self.exp = @exp_list[level]
end
#--------------------------------------------------------------------------
# * Change EXP
# exp : new EXP
#--------------------------------------------------------------------------
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
break if @level >= @final_level
@level = [@level + 1, @final_level].min
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
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
You won't be able to use a variable but you can use a script call for $game_actors[ACTOR_ID].final_level = 10, or 20, or whichever. Set it individually for each character, and it defaults to whatever you have in the database. Do you want the characters to continue to gain XP when they're at their cap? Like, if Aluxes has enough XP for level 20, but his cap is 10, should he become level 20 when the cap is raised, or should he only have up to the XP of a level 10 as well?