Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-10-2009, 05:48 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 07-10-2009, 11:08 AM
Yeormom
Discordant
 
Join Date: Apr 2004
Location: 127.0.0.1
Posts: 402
Default

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.
__________________
Yeorwned
Bane of Life [Custom Classic/PvP]
Reply With Quote
  #3  
Old 07-10-2009, 11:26 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 07-10-2009, 11:27 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

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
Reply With Quote
  #5  
Old 07-10-2009, 11:35 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Oops, forgot to subtract one. Max sint32 value is 2,147,483,647, not that it matters for this purpose. :P
Reply With Quote
  #6  
Old 07-10-2009, 11:42 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 07-10-2009, 11:44 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

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.
Reply With Quote
  #8  
Old 07-11-2009, 03:37 PM
KingMort
Banned
 
Join Date: Sep 2006
Posts: 841
Default

Quote:
Well the subject is definitely out of scope for the actual trunk
What are you talking about ??? This is Eqemu the max level on LIVE right now is 85... And will soon most likely be 90.. So this issue really should be looked into and fixed..
Reply With Quote
  #9  
Old 07-11-2009, 04:26 PM
steve
Discordant
 
Join Date: Jan 2002
Posts: 305
Default

Quote:
Originally Posted by KingMort View Post
What are you talking about ??? This is Eqemu the max level on LIVE right now is 85... And will soon most likely be 90.. So this issue really should be looked into and fixed..
Max level for Underfoot (next expansion) is staying put at 85. It'll be at least another year and a couple months before we get another level increase.
Reply With Quote
  #10  
Old 07-11-2009, 04:33 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Either way, as long as it isn't hindering normal servers at all, and isn't a massive amount of extra code, I don't see any reason it couldn't be added in for servers wanting to make use of higher levels. We know there are at least a few out there that do want to or do already.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #11  
Old 07-10-2009, 11:57 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Quote:
Originally Posted by trevius View Post
How many levels are you needing to allow exactly, Secrets?
I will take all 254 please
better do it just once and never have to worry about it again
Reply With Quote
  #12  
Old 07-10-2009, 03:50 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by trevius View Post
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.
I ended up writing my own formula to allow it, heh. But it is more than 112, but even then, this is a very nice advancement.

The solution was changing the 1000 multiplier to a lower number. It allows for a smooth progression.

Last edited by Secrets; 07-10-2009 at 11:55 PM..
Reply With Quote
  #13  
Old 07-10-2009, 04:24 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I wonder if that multiplier should be made into a rule that defaults to 1000. Might not be a bad solution for the servers out there wanting to go higher. I know there aren't many, but a rule might not be a bad option. I am not sure on the details of how exp is sent to the client though, so not sure how changing that might effect leveling rates and such.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 07-11-2009 at 12:26 AM..
Reply With Quote
  #14  
Old 07-10-2009, 04:52 PM
Yeormom
Discordant
 
Join Date: Apr 2004
Location: 127.0.0.1
Posts: 402
Default

This is why I cried custom feature. :(
__________________
Yeorwned
Bane of Life [Custom Classic/PvP]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:10 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3