Calculating experience for Pindleskin
I have a spreadsheet that calculates the experience gained by running Pindleskin + minions on any difficulty, /players setting and character level. I thought I had it working correctly down to an exact amount of experience, but it turns out it's incorrect in some situations, often just 2 or 3xp (14 or 21xp for the entirety of Pindleskin + his minions on normal) - though I've one case which was off by 27xp (243xp for Pindleskin + minions on hell). In all cases I've tested my calculator thought the xp gained was higher than the real amount.
I've tested it through with a 47 barb on normal (As well as 45+46, which show the exact same results, to be expected), an 82 paladin on hell and a 90 sorceress, also on hell:
Barbarian: (Clvl 47, Normal Pindleskin - mlvl 45, base xp 12845)
-Works correctly for /p1, /p3, /p5 and /p7
-/p2: Calculates 19,267xp, actual value: 19,265 (-2xp)
-/p4: Calculates 32,112xp, actual value: 32,110 (-2xp)
-/p6: Calculates 44,957xp, actual value: 44,955 (-2xp)
-/p8: Calculates 57,802xp, actual value: 57,800 (-2xp)
Paladin: (Clvl 82, Hell Pindleskin - mlvl 86, base xp 254500)
-Works correctly for /p2 - /p7
-/p1: Calculates 94,790xp, actual value: 94,789 (-1xp)
-/p8: Calculates 426,555xp, actual value 426,528 (-27xp)
Sorceress: (Clvl 90, Hell Pindleskin - mlvl 86, base xp 254500)
-Works correctly for /p1 - /p8
As an example, this is how I calculate the experience for my Paladin on /p8:
As I mentioned before, the correct value is actually 426,528xp. Evidently this isn't a huge issue if I'm off by around 0.01% in the some of the worse cases, but I'm a sucker for perfection and I want to know the exact formulae and values I need, and not something that's "almost there". I'm far more of a mathematician than an engineer
Can someone help me out here? Show me where I'm going wrong? I'm almost certain it's to do with the /players command as that's the only thing that should affect the XP gained on the barb, who is within 5 levels above Pindleskin, and is far from the level 70+ penalties. The fact that it works perfectly on my Sorceress across the board, falters on /p1 and /p8 with my Paladin and every other /pX with my Barbarian is simply confusing for me.
Thanks,
-Crehl
[highlight]Update #1:[/highlight]
After plenty of time spent messing around with the formulae and many more Pindleskin runs (Not to mention late nights at 4/5am) I've made some progress. I'm only updating this now for future reference for me and/or anyone who comes across this thread looking for the answer.
Based on everything I've done in Normal & Nightmare (I shall get to Hell in a second), it seems that D2 does the following:
This appears to explain everything I've seen in Normal and Nightmare. The Base XP for Pindleskin in both those difficulties is 12845 and 74805 - both multiples of 5 but not 10. Hence, multiplying by 1, 2, 3 or 4 (/p1,3,5,7) will result in a multiple of 5 - so rounding to the neareast 5 makes no difference and my formula still works for those players settings.
Multiplying by 1.5,2.5,3.5 or 4.5 (/p2,4,6,8) won't result in a multiple of 5, but will result instead in a slightly greater number (2.5 greater than the next-lowest multiple, in fact). Rounding down to the nearest 5 and continuing with everything else results in correct values for everything I've got data for in Normal and Nightmare (Most of the late 40's - mid 60's, in terms of clvl).
Unfortunately, the results I got from my Paladin in Hell would still be incorrect. The Base XP for Pindleskin in Hell is 254500 - a multiple of 10 so multiplying by any of the players settings will always result in a multiple of 5 anyway.
This means (As far as I can tell) at least one of three things is hapenning:
Firstly, I am highlighy dubious of no. 3. Not likely to happen at all (I have no idea why it would, anyway), but until I've got data to rule it out, it's a possibility.
No. 1 and 2 then, would have to work in such as way that at clvl90 in hell things are identical to my calculations, but differ at clvl 82.
A bit of a long edit, but there's a chance - albeit a very small one - that someone running into the same problems as me will benefit from this.
[highlight]Update #2:[/highlight]
It occurred to me shortly after that last update that Uniques get a 5x bonus to their experience.. which would explain the strange rounding if the 5x is applied after rounding down to the nearest integer instead. Essentially the same thing, but makes a little more sense. I have also found that at /p1 and /p5 on Nightmare even my new calculations don't work.
Damnit Diablo, why do you do this to me.. :/
I have a spreadsheet that calculates the experience gained by running Pindleskin + minions on any difficulty, /players setting and character level. I thought I had it working correctly down to an exact amount of experience, but it turns out it's incorrect in some situations, often just 2 or 3xp (14 or 21xp for the entirety of Pindleskin + his minions on normal) - though I've one case which was off by 27xp (243xp for Pindleskin + minions on hell). In all cases I've tested my calculator thought the xp gained was higher than the real amount.
I've tested it through with a 47 barb on normal (As well as 45+46, which show the exact same results, to be expected), an 82 paladin on hell and a 90 sorceress, also on hell:
Barbarian: (Clvl 47, Normal Pindleskin - mlvl 45, base xp 12845)
-Works correctly for /p1, /p3, /p5 and /p7
-/p2: Calculates 19,267xp, actual value: 19,265 (-2xp)
-/p4: Calculates 32,112xp, actual value: 32,110 (-2xp)
-/p6: Calculates 44,957xp, actual value: 44,955 (-2xp)
-/p8: Calculates 57,802xp, actual value: 57,800 (-2xp)
Paladin: (Clvl 82, Hell Pindleskin - mlvl 86, base xp 254500)
-Works correctly for /p2 - /p7
-/p1: Calculates 94,790xp, actual value: 94,789 (-1xp)
-/p8: Calculates 426,555xp, actual value 426,528 (-27xp)
Sorceress: (Clvl 90, Hell Pindleskin - mlvl 86, base xp 254500)
-Works correctly for /p1 - /p8
As an example, this is how I calculate the experience for my Paladin on /p8:
Code:
clvl = 82
mlvl = 86
baseXP = 254500
mlvl - clvl = 4 [So, we use clvl/mlvl]
clvl/mlvl = 82/86 = [b]0.9535[/b] [Correct to 4dp here, exact value is used in the calculator]
clvl >= 70 [So, we apply another penalty]
400/1024 = [b]0.3906[/b] [Again, only correct to 4dp here.]
/players 8, so we get an xp bonus
(8 + 1)/2 = [b]4.5[/b]
[b]0.9535[/b] * [b]0.3906[/b] * [b]4.5[/b] = [b]1.6761[/b] [Again, only correct to 4dp here]
254500 * [b]1.6761[/b] = [b]426,555.7[/b] [1dp this time. I [i]believe[/i] this is rounded down based upon the results from my Sorc:]
int([b]426555.7[/b]) = [b]426,555 xp[/b]
As I mentioned before, the correct value is actually 426,528xp. Evidently this isn't a huge issue if I'm off by around 0.01% in the some of the worse cases, but I'm a sucker for perfection and I want to know the exact formulae and values I need, and not something that's "almost there". I'm far more of a mathematician than an engineer

Can someone help me out here? Show me where I'm going wrong? I'm almost certain it's to do with the /players command as that's the only thing that should affect the XP gained on the barb, who is within 5 levels above Pindleskin, and is far from the level 70+ penalties. The fact that it works perfectly on my Sorceress across the board, falters on /p1 and /p8 with my Paladin and every other /pX with my Barbarian is simply confusing for me.
Thanks,
-Crehl
[highlight]Update #1:[/highlight]
After plenty of time spent messing around with the formulae and many more Pindleskin runs (Not to mention late nights at 4/5am) I've made some progress. I'm only updating this now for future reference for me and/or anyone who comes across this thread looking for the answer.
Based on everything I've done in Normal & Nightmare (I shall get to Hell in a second), it seems that D2 does the following:
- Takes the Base XP and multiplies it by the /players factor (e.g., 4.5)
- Rounds down to the nearest multiple of 5
- Multiplies by the clvl/mlvl factor (Sometimes clvl/mlvl, sometimes 1, sometimes from a lookup table using clvl-mlvl)
- Multiplies by the clvl penalty factor (For clvl >= 70)
This appears to explain everything I've seen in Normal and Nightmare. The Base XP for Pindleskin in both those difficulties is 12845 and 74805 - both multiples of 5 but not 10. Hence, multiplying by 1, 2, 3 or 4 (/p1,3,5,7) will result in a multiple of 5 - so rounding to the neareast 5 makes no difference and my formula still works for those players settings.
Multiplying by 1.5,2.5,3.5 or 4.5 (/p2,4,6,8) won't result in a multiple of 5, but will result instead in a slightly greater number (2.5 greater than the next-lowest multiple, in fact). Rounding down to the nearest 5 and continuing with everything else results in correct values for everything I've got data for in Normal and Nightmare (Most of the late 40's - mid 60's, in terms of clvl).
Unfortunately, the results I got from my Paladin in Hell would still be incorrect. The Base XP for Pindleskin in Hell is 254500 - a multiple of 10 so multiplying by any of the players settings will always result in a multiple of 5 anyway.
This means (As far as I can tell) at least one of three things is hapenning:
- The experience formula works differently in Hell for some reason
- My formula is still not correct with regards to the clvl penalty
- Experience is calculated slightly differently depending on the class
Firstly, I am highlighy dubious of no. 3. Not likely to happen at all (I have no idea why it would, anyway), but until I've got data to rule it out, it's a possibility.
No. 1 and 2 then, would have to work in such as way that at clvl90 in hell things are identical to my calculations, but differ at clvl 82.
A bit of a long edit, but there's a chance - albeit a very small one - that someone running into the same problems as me will benefit from this.
[highlight]Update #2:[/highlight]
It occurred to me shortly after that last update that Uniques get a 5x bonus to their experience.. which would explain the strange rounding if the 5x is applied after rounding down to the nearest integer instead. Essentially the same thing, but makes a little more sense. I have also found that at /p1 and /p5 on Nightmare even my new calculations don't work.
Damnit Diablo, why do you do this to me.. :/
Last edited: