Exp Ball Calcs?

11/11/2012 21:13 -Shunsui-#1
Anyone got any good / close enough exp ball calculations?
11/11/2012 22:05 CptSky#2
Quote:
Originally Posted by -Shunsui- View Post
Anyone got any good / close enough exp ball calculations?
Hint: Third column in levexp.dat.
11/11/2012 22:47 .Kinshi#3
Quote:
Originally Posted by CptSky View Post
Hint: Third column in levexp.dat.
The column that states the required exp to gain a level? Very helpful lol
11/11/2012 22:59 CptSky#4
Quote:
Originally Posted by .Kinshi View Post
The column that states the required exp to gain a level? Very helpful lol
No, there is (was?) three column. The level, the required exp and the required "points". Knowing the required "points" to gain a level, you can easily determine the amount to add per exp ball (600)... So...
11/11/2012 23:07 .Kinshi#5
Quote:
Originally Posted by CptSky View Post
No, there is (was?) three column. The level, the required exp and the required "points". Knowing the required "points" to gain a level, you can easily determine the amount to add per exp ball (600)... So...
Ah, there's 5 columns now.

Code:
0 1 120 2 3
0 2 180 2 3
0 3 240 1 2
0 4 360 2 3
0 5 600 2 3
0 6 960 3 4
0 7 1200 3 4
0 8 2400 5 7
0 9 3600 7 9
0 10 8400 14 18
0 11 12000 18 23
0 12 14400 20 25
0 13 18000 23 29
0 14 21600 26 33
0 15 22646 25 32
0 16 32203 34 43
0 17 37433 37 47
0 18 47556 44 55
0 19 56609 50 63
0 20 68772 57 72
At the higher levels the last column is 600.
Still unsure how it all works together.
11/11/2012 23:18 turk55#6
Check Albetros, it has the best expball calculations released to the public.
11/11/2012 23:42 _DreadNought_#7
Quote:
Originally Posted by .Kinshi View Post
Ah, there's 5 columns now.

Code:
0 1 120 2 3
0 2 180 2 3
0 3 240 1 2
0 4 360 2 3
0 5 600 2 3
0 6 960 3 4
0 7 1200 3 4
0 8 2400 5 7
0 9 3600 7 9
0 10 8400 14 18
0 11 12000 18 23
0 12 14400 20 25
0 13 18000 23 29
0 14 21600 26 33
0 15 22646 25 32
0 16 32203 34 43
0 17 37433 37 47
0 18 47556 44 55
0 19 56609 50 63
0 20 68772 57 72
At the higher levels the last column is 600.
Still unsure how it all works together.
I believe the second column is the level and the 3rd is the EXP required, confirmation?
11/11/2012 23:55 .Kinshi#8
Quote:
Originally Posted by _DreadNought_ View Post
I believe the second column is the level and the 3rd is the EXP required, confirmation?
Correct!
11/12/2012 07:02 pro4never#9
Quote:
Originally Posted by turk55 View Post
Check Albetros, it has the best expball calculations released to the public.
They aren't close.

They are directly reverse engineered from the client itself.


As mentioned already. The levexp.dat contains a column referencing 'time' required for the level. This number is used anywhere that exp is awarded (exp balls, offline training ground, etcetc)

Each full exp ball is 600 points of experience so you can simply take the points required for each level and keep looping/leveling till you run out of points.


Full calculations are public in albetros if you wanted the example though.
11/13/2012 01:39 .Kinshi#10
Quote:
Originally Posted by pro4never View Post
They aren't close.

They are directly reverse engineered from the client itself.


As mentioned already. The levexp.dat contains a column referencing 'time' required for the level. This number is used anywhere that exp is awarded (exp balls, offline training ground, etcetc)

Each full exp ball is 600 points of experience so you can simply take the points required for each level and keep looping/leveling till you run out of points.


Full calculations are public in albetros if you wanted the example though.
I tired taking a look at yours but it confused me a tad bit.
Yours is slightly different than what I'm trying to get, which is the total amount of exp you get from the exp ball.

What I ended up with was close at the lower levels, but when your get over the 600 required, it didn't work.
I'm not sure how to continue.

Would you be able to help me over msn?
11/13/2012 02:04 CptSky#11
Quote:
Originally Posted by .Kinshi View Post
I tired taking a look at yours but it confused me a tad bit.
Yours is slightly different than what I'm trying to get, which is the total amount of exp you get from the exp ball.

What I ended up with was close at the lower levels, but when your get over the 600 required, it didn't work.
I'm not sure how to continue.

Would you be able to help me over msn?
Code:
        public UInt64 CalcExpBall(Byte Level, UInt64 CurExp, Double Amount)
        {
            if (Level >= Database.AllLevExp.Length)
                return 0;

            if (Level >= Database.AllLevTime.Length)
                return 0;

            UInt64 Exp = 0;
            Int32 Time = (Int32)(600.00 * Amount);

            if (CurExp > 0)
            {
                Double Pct = 1.00 - (Double)CurExp / (Double)Database.AllLevExp[Level];
                if (Time > (Int32)(Pct * Database.AllLevTime[Level]))
                {
                    Time -= (Int32)(Pct * Database.AllLevTime[Level]);
                    Exp += Database.AllLevExp[Level] - CurExp;
                    Level++;
                }
            }

            while (Time > Database.AllLevTime[Level])
            {
                Time -= Database.AllLevTime[Level];
                Exp += Database.AllLevExp[Level];
                Level++;

                if (Level >= Database.AllLevExp.Length)
                    return Exp;

                if (Level >= Database.AllLevTime.Length)
                    return Exp;
            }
            Exp += (UInt64)(((Double)Time / (Double)Database.AllLevTime[Level]) * (Double)Database.AllLevExp[Level]);

            return Exp;
        }
11/13/2012 02:42 .Kinshi#12
Awesome thanks, I had it done for the most part before you posted, but helped fix a few things.