EXPERIENCE RATE

This forum is for main questions (format files, STB / STL and so on).

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Forum rules
Client Editing is a delicate subject. osRose and osiRose will not support or use any Client Editing tool or results as a standard. So you are free to experiment, test, and develop there on Client Editing, but at your own risk :)

EXPERIENCE RATE

Postby Tartie on Fri Mar 04, 2016 2:15 pm

I want to ask something....on how can I change the expe rate because I got a high rate expe. I want it to be more like NaRose rate...I change the Expe rate in List_config...I change it to "1" already from 50 down to 30 and now its "1" but still I got a high rate I guess its 5.0% expe increase.. I want to make it 1.0% or even lower than than can someone help me on this it would be a great help?? your advise is much appreciated...thank you guys.

greets,
Tartie
Image
User avatar
Tartie
Pomic
Pomic
 
Posts: 72
Joined: Sat Nov 12, 2011 11:15 am
Location: Philippines

Re: EXPERIENCE RATE

Postby PurpleYouko on Fri Mar 04, 2016 4:35 pm

xp is awarded in function bool CWorldServer::GiveExp( CMonster* thismon, UINT special_lvl, UINT special_exp )
You will find this at the top of WorldProcesses.cpp

There are all kinds of different versions of this function out there.

Typically there is a line of code near the top that looks something like this
  1. unsigned long long exp = (unsigned long long)ceil((double)(thismon->thisnpc->exp * thisplayer->damage) / (thismon->thisnpc->hp*thismon->thisnpc->level)+special_exp);

It is called from bool CMonster::OnDie( ) in MonsterEvents.cpp

Pay special attention to that "special_exp" that gets added at the end. I have no idea what that is supposed to do since I don't use this formula in my own server at all

Just after that you will find this line
  1. exp = exp * (unsigned long long) (Config.EXP_RATE * 6);

Seems like that is what might be introducing your higher rate. It's multiplying the calculated exp by your config rate and then also by 6.
I suspect that if you remove the * 6 completely then you will get close to the 1X rate that you are looking for

in my server i use this much simpler formula
  1. //assign my own exp for monsters that I personally damaged
  2.             unsigned int exp = (unsigned int)floor(thismon->thisnpc->exp * MyPercent);
  3.             exp = exp * Config.EXP_RATE * map->mapXPRate;      //calculate base exp for this client. No medals or stuff accounted for yet

Mypercent is calculated earlier as a value representing how much of the monster's total HP I did in damage. Note this can be > 100% to allow for overkill XP
It would be a little complicated to convert a server to my system since the entire function had to be rewritten.
I also have exp rate multipliers as map variables hence map->mapXPRate. This can be adjusted via QSD, AIP or by killing/rebirthing the Map Base Crystal
my players also have personal xprate variables which can be affected by items, quests, medals and many others.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm


Return to Client Editing Question Zone

Who is online

Users browsing this forum: No registered users and 8 guests