Go Back   EQEmulator Home > EQEmulator Forums > Development > Development: Custom Code

Development: Custom Code This is for code thatdoes not emulate live and wont be added to the official code.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2016, 05:25 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Post Show gained/lost experience amounts

This source edit simply displays the amount of gained and lost experience to all players. This is something you will find in other private MMOs, such as Ragnarok Online or Lineage 2, and it answers a lot of questions I've had over the years about exp distribution calculations so felt it'd be a great insight for players, even if it distracts from nostalgic immersion.

RebuildEQ is my little self project and is utilizing this if you'd like to see it in action.

Note: The EXP display only shows gained NORMAL exp, not AA.


Gained experience


Lost experience (You can flip the value (-i) to remove the negative)


Ressurected 96% experience (It's technically ~95.9992%!)


The code:
zone/exp.cpp
Before:
Code:
if (isrezzexp)
		this->Message_StringID(MT_Experience, REZ_REGAIN);
	else{
		if(membercount > 1)
			this->Message_StringID(MT_Experience, GAIN_GROUPXP);
		else if(IsRaidGrouped())
			Message_StringID(MT_Experience, GAIN_RAIDEXP);
		else
			this->Message_StringID(MT_Experience, GAIN_XP);
After:
Code:
i = set_exp - m_pp.exp;
if (isrezzexp) {
	Message(15, "You regain %i experience from resurrection.", i);
}
else {
	if(membercount > 1) {
		Message(15, "You have gained %i party experience!", i);
	}
	else if(IsRaidGrouped()) {
		Message(15, "You have gained %i raid experience!", i);
	}
	else {
		Message(15, "You have gained %i experience!", i);
	}

zone/exp.cpp
Before:
Code:
else if((set_exp + set_aaxp) < (m_pp.exp+m_pp.expAA)){ //only loss message if you lose exp, no message if you gained/lost nothing.
		Message(15, "You have lost experience.");
	}
After:
Code:
else if((set_exp + set_aaxp) < (m_pp.exp+m_pp.expAA)){ //only loss message if you lose exp, no message if you gained/lost nothing.
		i = set_exp - m_pp.exp;
		Message(15, "You have lost %i experience.", i);
	}
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #2  
Old 01-21-2016, 12:38 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I actually have something similar in my log.out, especially when I was working on limited max XP per quest and kill to 11%.
Reply With Quote
  #3  
Old 01-21-2016, 02:36 AM
wirepuller134
Fire Beetle
 
Join Date: Jan 2013
Posts: 17
Default

Thank you!
Reply With Quote
  #4  
Old 01-21-2016, 12:46 PM
starblight's Avatar
starblight
Sarnak
 
Join Date: Jan 2007
Posts: 76
Default

Very cool will have to add this next time I build.
Reply With Quote
  #5  
Old 01-21-2016, 02:02 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

Added a note: This assumes all gained and lost experience is NORMAL exp, (I have AA's disabled on my server). If you guys plan to use this on a server with AAs enabled, more work is involved.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #6  
Old 01-21-2016, 02:15 PM
starblight's Avatar
starblight
Sarnak
 
Join Date: Jan 2007
Posts: 76
Default

I guess that would make sense. I am not planning on updating my source any time soon so will revisit when I do. If anyone else dose update it to work with AA's would be much appreciated if you posted it here. I am not sure I am able to figure it out but if I do I will be sure to post it.
Reply With Quote
  #7  
Old 01-21-2016, 02:23 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

It seems people are more interested in edits like this than I expected, so, if I find some time I'll toss in the AA version, and likely will post other snippets similar to this. Love the feedback, thanks.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #8  
Old 01-21-2016, 02:31 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I wonder how much Log.Out to something like GmSay actually uses resources if you are not subscribed to it? One place this would be noticeable would be the output of spells or mob pathing.
Reply With Quote
  #9  
Old 01-21-2016, 06:13 PM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

This is amazing Shin. Thank you for your work.
Reply With Quote
  #10  
Old 01-21-2016, 06:26 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

If edits like these are something usable, it is really easy to just turn them on via a rule, so people can use them if they want. Then they can exist in the main branch without issue
Reply With Quote
  #11  
Old 01-21-2016, 10:23 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

Quote:
Originally Posted by Akkadius View Post
If edits like these are something usable, it is really easy to just turn them on via a rule, so people can use them if they want. Then they can exist in the main branch without issue
Would you prefer this approach, Akka? I tend to go on tangents that I feel are too custom for most server use cases, but would be happy to create official submissions (or pull requests) based on my fork if there's an interest like this one, that use rulesets to easily toggle their usage.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #12  
Old 01-21-2016, 10:32 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by Shin Noir View Post
Would you prefer this approach, Akka? I tend to go on tangents that I feel are too custom for most server use cases, but would be happy to create official submissions (or pull requests) based on my fork if there's an interest like this one, that use rulesets to easily toggle their usage.
If it is something others can make use of and its not a major change, sure why not?
Reply With Quote
  #13  
Old 02-03-2016, 10:43 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

Something else I've mucked with



__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
Reply

Tags
display experience, show experience amount

Thread Tools
Display Modes

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 04:21 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3