Boolean Posted July 1, 2013 Share Posted July 1, 2013 I currently have : public int experienceForLevel(int level) { int total = 0; for (int i = 1; i < level; i++) { total += i + 300 * Math.pow(2, i / 7.0); } return (int) (total * 2.5) / 10; } However it returns the wrong answer at low levels (1-12). For example, I have 276 experience in the Summoning skill, but it results in the level of 276, not 4.It works fine for higher levels. This is for a RS Tool im making. Link to comment Share on other sites More sharing options...
Sy_Accursed Posted July 1, 2013 Share Posted July 1, 2013 That would be because low levels are made up numbers not defined by the actual curve.The actual curve doubles every seven levels but only starts working around lvl 12. 1 Operation Gold Sparkles :: Chompy Kills :: Full Profound :: Champions :: Barbarian Notes :: Champions Tackle Box :: MA RewardsDragonkin Journals :: Ports Stories :: Elder Chronicles :: Boss Slayer :: Penance King :: Kal'gerion Titles :: Gold Statue Link to comment Share on other sites More sharing options...
Boolean Posted July 1, 2013 Author Share Posted July 1, 2013 That would be because low levels are made up numbers not defined by the actual curve.The actual curve doubles every seven levels but only starts working around lvl 12. That makes ALOT of sense.. So I guess there's no way to fix that apart from having the minimum requirement at level 7/8? Link to comment Share on other sites More sharing options...
Sy_Accursed Posted July 1, 2013 Share Posted July 1, 2013 Nope no way to 'fix' it to work directly. The curve derived for the formula simply does not apply to the first few levels, they are just arbitrarily defined numbers to fill in the space in which the curve would not give desirable results. Only way to work around it would to be have a manually coded scenario for specific levels that override calculations with the predefined number. Operation Gold Sparkles :: Chompy Kills :: Full Profound :: Champions :: Barbarian Notes :: Champions Tackle Box :: MA RewardsDragonkin Journals :: Ports Stories :: Elder Chronicles :: Boss Slayer :: Penance King :: Kal'gerion Titles :: Gold Statue Link to comment Share on other sites More sharing options...
Boolean Posted July 1, 2013 Author Share Posted July 1, 2013 Nope no way to 'fix' it to work directly. The curve derived for the formula simply does not apply to the first few levels, they are just arbitrarily defined numbers to fill in the space in which the curve would not give desirable results. Only way to work around it would to be have a manually coded scenario for specific levels that override calculations with the predefined number. That's quite a bit of effort though.. :L Might just leave it as it is. Link to comment Share on other sites More sharing options...
Hedgehog Posted July 1, 2013 Share Posted July 1, 2013 I posted an array of the xp at each level in the programming forum. Can't link in a hurry sorry. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now