Show XP and Group XP values
instead of it saying "You have gained experience" how about making it so it shows the exact xp you gain. Its an easy fix. I already tested it, and it works perfect. Have not made the change for raid xp yet tho. It may be better to make it a choice, like a rule in the database to show it with the actual xp or not, in case some rather it not show. I also commented out the old messages rather than remove them incase of it not working correctly.
(the text in red is the changes I have made, its only about 3 or 4 lines, minor changes) line 187-216 of exp.cpp Code:
Code:
for (i = 0; i < MAX_GROUP_MEMBERS; i++) { |
Nice improvement, thanks for sharing.
But I think the change in exp.cpp isnt correct. Like in the AddExp() line, you need to refer either to tmp oder tmp2, so... Code:
cmember->Message(15,"Your share of the Group XP is %u", (tmp < tmp2 ? tmp : tmp2) ); //Shows the amount of group XP gained (RDurbin) |
thanks, it always annoyed me how it never said the real xp, even eq2 did the same until just recently. Plus its nice when your using bots to know how much xp your losing out if you go overboard.
I think its tmp 2 it sounds about right in my testing and looking at the code tmp2 is the result of bonus grp xp after being split down the line. I could very well be wrong, but comparing #s with single and with one bot seem about right. my server is doing the default bonus of .60 group xp. I dont remember the exact #s but fight an equal mob at level 1 was around 250ish (with server at 1.0 xp rate) and with a group of two you get around 205ish (grp xp bonus is 60% after all the other bonuses before you divide by 2) Im also thinking of showing the gain in % towards level. For example it may say "you have gained 3250 xp (25% of a level)" would be nice to know so you know how much each kill is moving you, I dont know tho, maybe too much info... |
tmp2 cant be right cause its just the max group xp you can get. If you display tmp2 in the message and AddEXP() uses either tmp1 or tmp2, the text wont display the correct value in most situations. Only the highest level char in group may see the right amount of xp he/she gets. The others xp is scaled depending on the level range in group.
Btw, you need to change ALL calls to SetEXP() with your altered parameter add_exp, not just the one in line 187. |
that last line was just a workaround I know its sloppy but was a quick fix originally the file passes set_exp not add_exp. what I did is made it pass add_exp instead and than put that data into set_exp. the reasoning for this is so I can display the add_exp data which is the actualy xp you get, set_exp is just the new xp total, which would not work. for example if you have 0 xp at start and kill a enemy worth 250, both set_exp and add_exp would be the same. but on the next kill it will screw up. basically it would say the next kill would be 500 xp, because its using the total xp instead of xp for last kill. So yeah it was my way to get the add_exp variable into that functions that contains the function to display the xp for that kill.
Im sure it could of been done better, like probably displaying the xp earned before you even go in the set_exp function. Im sure the group xp thing is wrong, really I have no way to test it with people in different levels, I only tested it with chars of same level, but im 100% sure the solo xp is correct. Ill try changing group xp to what its passing, should work... ------------------------------------ EDIT: Ok fixed the problem with the group xp, I just moved it to same place near the solo xp displaying, since they are displayed after it calculates the xp for group xp it passes through all the other modifers, including mobcolor, if your server uses that rule. to be safe i just commented the old spot group xp was in. here is the new change (can prob show raid xp using the exact same line as well) Code:
SetEXP(add_exp, aaexp, resexp); |
This would be a nice rule to add in. As a player I always liked seeing the numbers. Maybe I just play to much D&D :P
My GM toon on my test server already sees the XP when he kills something so maybe some rule could be dropped in to show that? |
fixed the mistake I made, works perfect now
Guys ignore the code I posted before, it has a critical error in it, I fixed it with the code below, it also displays the amount of xp you lose and raid xp, i commented out the normal xp messages, these lines are from 207-214, apply these changes to the original exp.cpp, the xp loss message is in yellow and should probably be in red, but im not sure what message # you use for red text
LINES 207-214 of exp.cpp Code:
if(this->IsGrouped()) |
great idea
I love this idea. I hope this is refined and implemented.
|
All times are GMT -4. The time now is 06:39 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.