PDA

View Full Version : Show gained/lost experience amounts


Shin Noir
01-20-2016, 05:25 PM
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
http://i.imgur.com/yy9OwI0.png

Lost experience (You can flip the value (-i) to remove the negative)
http://i.imgur.com/qTs7kqM.png

Ressurected 96% experience (It's technically ~95.9992%!)
http://i.imgur.com/O1mImS3.png

The code:
zone/exp.cpp
Before:

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:

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:

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:

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);
}

provocating
01-21-2016, 12:38 AM
I actually have something similar in my log.out, especially when I was working on limited max XP per quest and kill to 11%.

wirepuller134
01-21-2016, 02:36 AM
Thank you!

starblight
01-21-2016, 12:46 PM
Very cool will have to add this next time I build.

Shin Noir
01-21-2016, 02:02 PM
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.

starblight
01-21-2016, 02:15 PM
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.

Shin Noir
01-21-2016, 02:23 PM
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.

provocating
01-21-2016, 02:31 PM
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.

nenelan
01-21-2016, 06:13 PM
This is amazing Shin. Thank you for your work.

Akkadius
01-21-2016, 06:26 PM
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

Shin Noir
01-21-2016, 10:23 PM
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.

Akkadius
01-21-2016, 10:32 PM
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?

Shin Noir
02-03-2016, 10:43 PM
Something else I've mucked with

http://i.imgur.com/riCNFDZ.png

http://i.imgur.com/h5pAt3T.png