current max exp
current max exp
In Grim 2 the maximum experience needed for a level up starts out at 1000. This maximum increases as the game progresses. Is there a function I can use to get the current maximum experience needed for a level up at any point in the game? I know I can use setSkillPoints() or addSkillPoints() or trainSkill() to add level ups but I would like to know how many experience points are needed to get to the next level up.
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: current max exp
This function returns xp needed to level up for the current level:
Code: Select all
levels = {1,2,3,4,5,6,7,8,9,10,20,25,50,50,50,50,100,100,500,1000}
function xpUp(level) return level>0 and levels[math.min(#levels,level)]*1000 or 0 end