EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Feature Requests (https://www.eqemulator.org/forums/forumdisplay.php?f=612)
-   -   Ability to level past 89ish? (https://www.eqemulator.org/forums/showthread.php?t=28822)

Secrets 07-08-2009 08:41 PM

Ability to level past 89ish?
 
I noticed recently that if you try and get past a level around level 89, you cannot go past level 89, or so. Is there a way to fix this?

I'm guessing it would be in exp.cpp and features.h, but... I am not sure.

I would love to see the ability to level to 254 (which is the max before you have spell issues) added into the source. (in b4 why are you having characters level that high?)

ChaosSlayerZ 07-08-2009 09:08 PM

I absolutly, 500%, support this notion!

I don't know about 254 (yet) but I have allready laid out content progression up till lev 150 =)

trevius 07-09-2009 03:10 AM

I don't recall there being a limit in the source other than level 254. Though, there may be a define set for it that sets it to 127. As far as I know, there is nothing restricting levels below 127 atm. I can #level to 254 just fine. I assume you are referring to leveling via experience? Which client are you using, Titanium or SoF? Are you sure you have both the MaxLevel and MaxExpLevel rules set to allow you to go above those levels?

Why are you needing to level that high??? JK, I am betting it is Raid Addicts related :P

Secrets 07-09-2009 04:20 AM

Quote:

Originally Posted by trevius (Post 173871)
I don't recall there being a limit in the source other than level 254. Though, there may be a define set for it that sets it to 127. As far as I know, there is nothing restricting levels below 127 atm. I can #level to 254 just fine. I assume you are referring to leveling via experience? Which client are you using, Titanium or SoF? Are you sure you have both the MaxLevel and MaxExpLevel rules set to allow you to go above those levels?

Why are you needing to level that high??? JK, I am betting it is Raid Addicts related :P

It's via experience and I think it is directly related to the experience formula in features.h, i'll see what I can do about it.

And no, it's not related to raid addicts for a change. It's a secret project!

Yeormom 07-09-2009 11:06 AM

Code:

#define HARD_LEVEL_CAP 127
The definition EXP_FORMULA is not preventing you from exceeding level 89.

Secrets 07-09-2009 07:14 PM

Quote:

Originally Posted by Yeormom (Post 173883)
Code:

#define HARD_LEVEL_CAP 127
The definition EXP_FORMULA is not preventing you from exceeding level 89.

That variable isn't used anymore in source, AFAIK. The only time I saw it used was in SKILL_CAPS, and I think it was removed recently.

KingMort 07-09-2009 07:33 PM

ATM When you get past 87, actually when you ding 88 then die you will go to level 1 that is why 87 is the max level on Raid Addicts... To counter this you could have player quests running so it gives them an extra bit of exp after they ding 88+ ... But that is kindof ghetto if you ask me

ChaosSlayerZ 07-09-2009 08:42 PM

Quote:

Originally Posted by KingMort (Post 173925)
ATM When you get past 87, actually when you ding 88 then die you will go to level 1 that is why 87 is the max level on Raid Addicts... To counter this you could have player quests running so it gives them an extra bit of exp after they ding 88+ ... But that is kindof ghetto if you ask me

it certainly does sucks

trevius 07-10-2009 05:48 AM

Oh, maybe the total experience is exceeding the number allowed by an int32, which is what I assume exp uses. Does anyone know how much total exp you would have at level 88/89? The max allowed for int32 would be 4,294,967,295.

Yeormom 07-10-2009 11:08 AM

Well the subject is definitely out of scope for the actual trunk so this should probably be moved to custom code so you can at least begin your crusade if you so desire. You can definitely create a solution for this if so desired that won't affect the 32-bit integer cap.

trevius 07-10-2009 11:26 AM

There isn't any code in this thread yet, so I don't think it really needs to go in custom code yet. And even if there was, as long as a fix can be put in that is fairly simple and doesn't affect normal servers, I don't see why there would be a problem with having it included on the SVN. Live is getting really close to level 90 max already, so it isn't like it is way out of scope of the project or anything.

Shendare 07-10-2009 11:27 AM

The XP formula in EQEmu appears to be (Level - 1) cubed times LevelMod times 1000.

Level mod above 60 is 3.1.

So, Experience to get to the cap levels would be:

88: (87*87*87)*3.1*1000 = 2,041,359,300
89: (88*88*88)*3.1*1000 = 2,112,563,200
90: (89*89*89)*3.1*1000 = 2,185,403,900

The maximum value for a signed int32 is 2,147,483,648, about halfway between 89 and 90.

It looks to me like something in exp.cpp is using a signed int32 in its experience calculations.

I checked Client::AddExp(), Client::SetExp(), Group::SplitExp(), Raid::SplitExp(), and NPC::Death(), and didn't find an sint32 reference in any of them.

I thought at first there was a problem because I was seeing references to uint32 and int32, and assumed int32 was a signed int32, but I was mistaken. int32 and uint32 are both typedefs of unsigned int, according to common/types.h.

So further investigation will be necessary.

This unrelated code in SetExp, however, may need a review:

File: exp.cpp, Line 212 - SetExp()
Code:

        //check_level represents the level we should be when we have
        //this ammount of exp (once these loops complete)
        int16 check_level = GetLevel()+1;
        //see if we gained any levels
        while (set_exp >= GetEXPForLevel(check_level)) {
                check_level++;
                if (check_level > 127) {        //hard level cap
                        check_level = 127;
                        break;
                }
        }

- Shendare

Shendare 07-10-2009 11:35 AM

Oops, forgot to subtract one. Max sint32 value is 2,147,483,647, not that it matters for this purpose. :P

trevius 07-10-2009 11:42 AM

Nice work, Shendare! So, it sounds like we could just change the sint to a int32 and get quite a few more levels out of the int32. Using that formula, it should be able to go to level 112:

int32 max is 4294967295
112 (111*111*111)*3.1*1000 = 4239656100
113 (112*112*112)*3.1*1000 = 4355276800

How many levels are you needing to allow exactly, Secrets? If it is less than 113, then it sounds like the solution might not be too bad. If it is more than that, I am sure it could be worked out, but would probably take more work/code to do it.

Shendare 07-10-2009 11:44 AM

Actually, you must have misunderstood.

While I have identified that the problem is almost certainly an sint32 (or perhaps just an "int") somewhere in the code, I haven't found where it is yet.


All times are GMT -4. The time now is 02:38 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.