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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-20-2016, 05:25 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
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
 

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 02:57 AM.


 

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