|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Development: Custom Code This is for code thatdoes not emulate live and wont be added to the official code. |
|
|
|
01-20-2016, 05:25 PM
|
|
Legendary Member
|
|
Join Date: Apr 2002
Location: Seattle, WA
Posts: 505
|
|
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);
}
|
|
|
|
01-21-2016, 12:38 AM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
I actually have something similar in my log.out, especially when I was working on limited max XP per quest and kill to 11%.
|
01-21-2016, 02:36 AM
|
Fire Beetle
|
|
Join Date: Jan 2013
Posts: 17
|
|
Thank you!
|
01-21-2016, 12:46 PM
|
|
Sarnak
|
|
Join Date: Jan 2007
Posts: 76
|
|
Very cool will have to add this next time I build.
|
01-21-2016, 02:02 PM
|
|
Legendary Member
|
|
Join Date: Apr 2002
Location: Seattle, WA
Posts: 505
|
|
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.
|
01-21-2016, 02:15 PM
|
|
Sarnak
|
|
Join Date: Jan 2007
Posts: 76
|
|
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.
|
01-21-2016, 02:23 PM
|
|
Legendary Member
|
|
Join Date: Apr 2002
Location: Seattle, WA
Posts: 505
|
|
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.
|
01-21-2016, 02:31 PM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
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.
|
01-21-2016, 06:13 PM
|
Hill Giant
|
|
Join Date: Feb 2008
Posts: 116
|
|
This is amazing Shin. Thank you for your work.
|
01-21-2016, 06:26 PM
|
|
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
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
|
01-21-2016, 10:23 PM
|
|
Legendary Member
|
|
Join Date: Apr 2002
Location: Seattle, WA
Posts: 505
|
|
Quote:
Originally Posted by Akkadius
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.
|
01-21-2016, 10:32 PM
|
|
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by Shin Noir
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?
|
02-03-2016, 10:43 PM
|
|
Legendary Member
|
|
Join Date: Apr 2002
Location: Seattle, WA
Posts: 505
|
|
Something else I've mucked with
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 06:00 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|