How is "XP earned" determined?

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

How is "XP earned" determined?

Post by John Adams » Tue Mar 16, 2010 10:56 am

This is probably an odd time for me to ask this... but how exactly is the amount of XP earned for mob slaying determined? There has to be some math out there somewhere, and LE originally put some of that into EQ2Emu and I am too blind to find it. But here's where I'm going with this question.

What if I have 2 NPCs - both level 5, both ^^^, one normal (common), one Named (rare). When my players come to attack the common NPC, they get (some_math_equation) worth of XP for killing this ^^^ encounter.

Once they are done fighting that NPC, the Named ^^^ spawns - same stats and everything, just worth more XP for the kill. How would we go about doing that?


I started wondering if there needs to be an xp_modifier on the spawn records, too. We have XP values for quests that we can set, so I started thinking about how to get out of allowing EQ2World to dictate what XP value a mob might be worth.

Thoughts?

User avatar
Arremis
Retired
Posts: 388
Joined: Sun Sep 02, 2007 10:11 am
Location: Memphis, TN

Re: How is "XP earned" determined?

Post by Arremis » Tue Mar 16, 2010 11:57 am

EDIT:
I managed to dig up this old post: <--- Click here :D
Last edited by Arremis on Tue Mar 16, 2010 4:22 pm, edited 1 time in total.
I am the UI Master...there is no charge for my awesomeness.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: How is "XP earned" determined?

Post by John Adams » Tue Mar 16, 2010 12:26 pm

I just added the output of XP I am earning to the "You gained experience!" message on my test server. I fought a level 1 deer, got (45) XP. I fought a level 2 deer, got (85) and dinged. I then fought another level 1 deer, and this time got (35).

So maybe that's just how SOE does it, and there would be no need (aside from allowing custom values) to add xp_modifier to Spawns.

Arremis, when linking, use the [url] BBCode. PHPBB3 seems to break straight pastes and I am too lazy to search myself ~whistles a little tune~

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: How is "XP earned" determined?

Post by John Adams » Tue Mar 16, 2010 12:52 pm

Ah hah... so I lowered the deer level 1 from 2 down arrows (difficulty 3) to 3 down arrows (difficulty 0). And I got 20 XP.

So now I know that difficulty also effects XP. I mean, I guess I knew that - and all you experienced EQ2 players probably knew that too... but until I see the numbers shooting out the screen myself, I tend to not 'get it' :)

User avatar
Arremis
Retired
Posts: 388
Joined: Sun Sep 02, 2007 10:11 am
Location: Memphis, TN

Re: How is "XP earned" determined?

Post by Arremis » Tue Mar 16, 2010 4:22 pm

Edited post above lol :D
I am the UI Master...there is no charge for my awesomeness.

User avatar
ZexisStryfe
Posts: 1026
Joined: Thu Jul 26, 2007 6:39 am
EQ2Emu Server: Sytherian Legends
Location: Connecticut
Contact:

Re: How is "XP earned" determined?

Post by ZexisStryfe » Tue Mar 16, 2010 4:43 pm

That post is old Ar!
~ EQ2 Emulator Project Manager

Image
Image
Image
"Zexis, from this day forth, you shall be known as... '3 of 6'" - John Adams

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: How is "XP earned" determined?

Post by John Adams » Tue Mar 16, 2010 9:38 pm

Ok, getting warmer! I found something in Player.cpp:

These seem to be the multipliers for how difficult the spawn is, by it's /con color...

Code: Select all

	switch(GetArrowColor(victim->GetLevel())){
		case ARROW_COLOR_GREEN:
			multiplier = 3.25;
			break;
		case ARROW_COLOR_BLUE:
			multiplier = 3.5;
			break;
		case ARROW_COLOR_WHITE:
			multiplier = 4;
			break;
		case ARROW_COLOR_YELLOW:
			multiplier = 4.25;
			break;
		case ARROW_COLOR_ORANGE:
			multiplier = 4.5;
			break;
		case ARROW_COLOR_RED:
			multiplier = 6;
	}

And now that gets multiplied by 8... not sure why 8?

Code: Select all

	float total = multiplier * 8;
Then we determine the mobs encounter level (difficulty) and do a little more math:

Code: Select all

	if(victim->GetEncounterLevel() > 6) // no need to multiply by 1 if this is a normal mob
		total *= (victim->GetEncounterLevel() - 5);
	else if(victim->GetEncounterLevel() <= 5)
		total /= (7 - victim->GetEncounterLevel()); //1 down mobs are worth half credit, 2 down worth .25, etc
Then we ask, is this guy Heroic? If so, let's add s'more XP:

Code: Select all

	if(victim->GetHeroic() > 1)
		total *= victim->GetHeroic();
Oh hey, is double-XP enabled? If so, let's see how much vitality we can apply:

Code: Select all

	if(DoubleXPEnabled()){
		float percent = (((float)(total))/GetNeededXP()) *100;
		if(GetXPVitality() >= percent){
			GetInfoStruct()->xp_vitality -= percent;
			total *= 2;
		}
		else{
			total += ((GetXPVitality() / percent) *2)*total;
			GetInfoStruct()->xp_vitality = 0;
		}
	}
And finally... what is the global XP modifier for the entire world? (from the variables table)

Code: Select all

	return total * world.GetXPRate();

Sorry, forgive me if I seem a little excited. I might have actually figured something out on my own.

It is all these hard-coded values I woulkd eventually like to see become configurable, via config files, variables table, or (preferred) a Rules System like in EQEmu.

User avatar
ZexisStryfe
Posts: 1026
Joined: Thu Jul 26, 2007 6:39 am
EQ2Emu Server: Sytherian Legends
Location: Connecticut
Contact:

Re: How is "XP earned" determined?

Post by ZexisStryfe » Wed Mar 17, 2010 6:13 am

You would be correct... however I don't agree with those calculations. While xp does vary with difficulty (triple down to triple up) on live I recall the devs stating that the creatures /con (green, blue, etc.) does not effect the XP given. The reason it seems like it does is because a level 5 (Even con) creature may give 50 XP, a yellow level 6 con give 65 xp purely because it is level 6. Even difficulty modifiers are minimal on live. Killing a triple up lvl 5 may only give 1.25x the xp of a standard level 5 mob. That is why even classes that can solo triple ups (like necros, which I play) don't do so for xp. Usually when killing triple ups you are in groups, and group has its own bonuses to xp dependant on how many people are in the group.
~ EQ2 Emulator Project Manager

Image
Image
Image
"Zexis, from this day forth, you shall be known as... '3 of 6'" - John Adams

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: How is "XP earned" determined?

Post by John Adams » Wed Mar 17, 2010 7:02 am

See, precisely why I am asking this question. The stuff that was hard-coded years ago may not apply, or may have never applied, and perhaps LE just wanted to get some form of XP reward in the Emu in it's early stages. Combat has indeed evolved, but we still have a long way to go.

I fear putting any effort into altering this to be more live-like though, since SOE will likely change everything in 2 mos again like they always do the moment we re-vamp a system.

User avatar
ZexisStryfe
Posts: 1026
Joined: Thu Jul 26, 2007 6:39 am
EQ2Emu Server: Sytherian Legends
Location: Connecticut
Contact:

Re: How is "XP earned" determined?

Post by ZexisStryfe » Wed Mar 17, 2010 7:35 am

To my knowledge none of this has changed since at least EoF at the latest. I think we would be relatively safe changing this. SoE usually changes xp curves, not how XP is gained.
~ EQ2 Emulator Project Manager

Image
Image
Image
"Zexis, from this day forth, you shall be known as... '3 of 6'" - John Adams

User avatar
Arremis
Retired
Posts: 388
Joined: Sun Sep 02, 2007 10:11 am
Location: Memphis, TN

Re: How is "XP earned" determined?

Post by Arremis » Wed Mar 17, 2010 9:52 am

What if all the mobs had a definite base xp value?
I am the UI Master...there is no charge for my awesomeness.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests