Latest Diablo 3 News
Support the site! Become a Diablo: IncGamers PAL - Remove ads and more!

# Need help with formula behind experience penalties.

Discussion in 'Theorycrafting and Statistics' started by ElSmisko, May 18, 2013.

1. ### ElSmiskoIncGamers Member

Joined:
May 16, 2007
Messages:
252
0
Trophy Points:
102
Hey all!

I am trying to figure out how the experience penalty is calculated.
I know that there are tables with these values on the wiki but I want to know how they are calculated.
This is what I have deducted so far from reading the wiki. I bet some of you out there have been digging in the source code and can help explain to me what really happens.

Perhaps there allready is a thread where this is explained, but if so, I couldn't find it.

First off we have the character level (clvl) and area/monster level (mlvl).
As far as i understand, the basic percentage of experience kept is done by taking the ratio between clvl and mlvl and with a maximum of 100% and a minimum of 5%.
Code:
```if [clvl]/[mlvl] > 1 then
[xpquotekept] = 1
elseif [clvl]/[mlvl] < 0.05 then
[xpquotekept] = 0.05
else
[xpquotekept] = [clvl]/[mlvl]
end if```
Then the game checks to see if the character is below level 25 and in an area that differs at least 5 levels from the character.
If the level difference is equal to or greater than 10, the penalty is kept at 5 %.
I don't really see how that penalty is calculated though, and the penalty for positive and negative level difference differs. Any input here is apprechiated.
Code:
```if [clvl] < 25 and abs([clvl] - [mlvl]) > 5 then
if abs([clvl] - [mlvl]) > 10 then
[xpquotekept] = 0.05
else
[xpquotekept] = 1 - ???
end if
end if```
Then the game checks to see if the character is level 70-85 and gives an additional penalty on the ratio we calculated earlier.
Each character level above 69 subtracts an additional 4,6875% of the ratio.
Code:
```if [clvl] >= 70 and [clvl] <= 85 then
[xpquotekept] = [xpquotekept] * (1 - ([clvl]-69)*0.046875)
end if```
At level 85 the penalty lets the character keep 25% of the experience ratio, but I noticed that when the character is above level 85 it changed to a decrease of a quarter for each additional level.
Code:
```if [clvl] > 85 then
[xpquotekept] = [xpquotekept] * (1 - 0.25*(3/4)^([clvl]-85))
end if```
And then the game gives the experience to the character.
Code:
`[characterxp] = [characterxp] + [monsterxp] * [xpquotekept]`
Then on top of all this there are of course rounding errors and such that have to be taken into consideration.

This is my interpretation of what happens. I hope someone can explain this in more detail to me.

Last edited: May 18, 2013
2. ### RodrigoIncGamers Member

Joined:
Jun 13, 2006
Messages:
49
0
Trophy Points:
20
Everything you need to know is explained in good detail here.

It also mentions experience bonuses for being partied, moster experience gains by increased number of players, exp penalty at higher levels and more.

3. ### VictusIncGamers Member

Joined:
Apr 27, 2008
Messages:
278
0
Trophy Points:
42
Look at the source of that calculator. It's pretty much how the game calculates experience with one slight rounding error when calculating it for champions/minions/uniques on even player c?unt(2, 4, 6, 8).
Here is old thread about calculating Pindleskin experience on that same subject.

4. ### ElSmiskoIncGamers Member

Joined:
May 16, 2007
Messages:
252
0
Trophy Points:
102
Rodrigo: Haha, how silly of me to not think of looking at Arreat Summit and start digging in the forums instead. =) Thanks!

Victus: Ah, interesting, will take a look. Thanks!