PDA

View Full Version : Fix: Zone_Exp_Multiplier not used to factor XP


TheLieka
08-25-2007, 10:44 AM
When I set up my server with the intention of having "hotspot" zones, I noticed that the zone_exp_multiplier from the zone table was not being used to calculated the xp for a kill.

I'm sure there are better ways to do this, but here's what I changed in my code to make this work:

I made the following change to the void Client::AddEXP function within exp.cpp


void Client::AddEXP(int32 add_exp, int8 conlevel, bool resexp) {
if (m_epp.perAA<0 || m_epp.perAA>100)
m_epp.perAA=0; // stop exploit with sanity check

int32 add_aaxp;
if(resexp) {
add_aaxp = 0;
} else {
//figure out how much of this goes to AAs
add_aaxp = add_exp * m_epp.perAA / 100;
//take that ammount away from regular exp
add_exp -= add_aaxp;

float totalmod = 1.0;
//get modifiers
if (zone->GetEXPMod() > 0) {
totalmod = zone->GetEXPMod();
//Lieka: Add in the zone_exp_multiplier value from the database
totalmod *= zone->newzone_data.zone_exp_multiplier;
}

if(RuleR(Character, ExpMultiplier) >= 0){
totalmod *= RuleR(Character, ExpMultiplier);
}


add_exp = int32(float(add_exp) * totalmod);


Thanks,
Daxum

ven-elexver
12-15-2007, 01:28 AM
HI. Yea a noob found your post haha so i have a server up well a out of the box peq i have done nothing to even say (i have a server running) just did a step by step set up But i would like to have Gm events that would give higher exp maybe for my whole server /all zones But i look at this post and its all greek to me Could someone dumb down how to set and unset up the exp for peq DB server ? (will need to be a step by step ) Thanks to any that has time to help noobs like me

Teremarr
12-17-2007, 07:04 AM
Well, what you are asking for is pretty specific (creating "specialized" exp rates for GM events). As for a noob-guide, any guide would require you to get a handle on SQL and learn the MySQL query tool. (The MySQL query tool was installed right after the MySQL database, if you are following the PDF guide for EQEmu setup.) Once you learn how to search for values and edit them with the query tool, look at the Zone table - that has the zone-wide XP multipliers in it. As for something specialized, like GM events, you will defiantely have to "un-noob" yerself, learning SQL, Perl scripting, and maybe C++. Try just reading through the Wiki, and looking at the raw data in the database. You should start to recognize things.

Bishop4351
12-17-2007, 08:13 AM
If nothing else get phpMyAdmin installed and start looking it over. Some of the tables are hard to read but most are very straight forward.

ven-elexver
12-21-2007, 12:29 AM
Thanks for the info on this i use some of the edit software you named but as for c++ your over my head But sounds like i maybe could use Mysql,Q or Navicat to edit the exp rate for a zone With a little more reading in on the topic
but a magic button for all zones would be nice lol But ill keep looking and i will look at the zone Tables see if i can find the EXP rate for a zone and play with it a little TY for the help :D

John Adams
12-26-2007, 08:10 AM
Did this fix ever make it into the core? I cannot find it in the changelogs. It would be a nice addition, if not.

Cripp
12-26-2007, 08:24 AM
Did this fix ever make it into the core? I cannot find it in the changelogs. It would be a nice addition, if not.

yes it did.
http://eqemulator.cvs.sourceforge.net/eqemulator/EQEmuCVS/Source/zone/exp.cpp?r1=1.9&r2=1.10