Deathshiver
Member
- Joined
- Nov 2, 2012
- Messages
- 119
- Reaction score
- 1
I've been doing some personal debugging and investigating of Trinity's incorrect display of experience information in the RunStats log. After some testing, I have found that occasionally Trinity's measure of Trinity.Player.ParagonExperienceNextLevel (dubbed as LastXP) defaults to 0. This variable is important for recognizing the amount of experience you had at the last time Trinity checked -- therefore when it defaults to 0 it assumes that you have recently gained ALL of the experience that you currently have. To put this into plain English, it means that experience you have already earned can be double counted (and this can happen many times; in fact my tests revealed it to happen 16 times in 50 minutes). The following line on Items\ItemHandling.cs is what applies the faulty XP information to your total:
The exact cause of LastXP being defaulted to 0 is currently unclear. While it appears to happen most often after using a waypoint, I have observed this occuring in normal combat.
That said, there was another way to approach the problem which currently does NOT appear to be bugged: To use experience deficit to count total experience gained. Unliked checking the CurrentExperience, Trinity.Player.ParagonExperienceNextLevel (dubbed NextLevelXP) never appeared to deviate from expected values during my tests. Below is the results of my most recent T1 Rift run, which I manually recorded my experience and compared, the fixed Trinity was 100% accurate. For fun, I had the log also record the number of errors detected in the values. As you will see at the end, the code WOULD have incorrectly given hundreds of millions of experience 16 times, but was instead completely accurate because I was using deficits.
To apply the fix, please change the following:
Link: Patch (Diff)
Find in Items\ItemHandling.cs
Replace:
P.S. Let me know if this doesn't fix it. All of my tests indicated the information was now correct, but I'm just one person with limited testing time.
Code:
TotalXP += Trinity.Player.ParagonCurrentExperience - LastXP;
The exact cause of LastXP being defaulted to 0 is currently unclear. While it appears to happen most often after using a waypoint, I have observed this occuring in normal combat.
That said, there was another way to approach the problem which currently does NOT appear to be bugged: To use experience deficit to count total experience gained. Unliked checking the CurrentExperience, Trinity.Player.ParagonExperienceNextLevel (dubbed NextLevelXP) never appeared to deviate from expected values during my tests. Below is the results of my most recent T1 Rift run, which I manually recorded my experience and compared, the fixed Trinity was 100% accurate. For fun, I had the log also record the number of errors detected in the values. As you will see at the end, the code WOULD have incorrectly given hundreds of millions of experience 16 times, but was instead completely accurate because I was using deficits.
Code:
===== Misc Statistics =====
Total tracking time: 0h 50m 50s
Total deaths: 0 [0 per hour]
Total games (approx): 3 [3.53999996185303 per hour]
Total XP gained: 386.320007324219 million [455.910003662109 million per hour]
Total Gold gained: 784.840026855469 Thousand [926.219970703125 Thousand per hour]
TimesLastError=16; TimesNextError=0
To apply the fix, please change the following:
Link: Patch (Diff)
Find in Items\ItemHandling.cs
Code:
else
{
if (!(TotalXP == 0 && LastXP == 0 && NextLevelXP == 0))
{
if (LastXP > Trinity.Player.ParagonCurrentExperience)
{
TotalXP += NextLevelXP;
}
else
{
TotalXP += Trinity.Player.ParagonCurrentExperience - LastXP;
}
}
LastXP = Trinity.Player.ParagonCurrentExperience;
NextLevelXP = Trinity.Player.ParagonExperienceNextLevel;
}
Replace:
Code:
else
{
if (!(TotalXP == 0 && LastXP == 0 && NextLevelXP == 0))
{
// We have leveled up
if (NextLevelXP < Trinity.Player.ParagonExperienceNextLevel)
{
TotalXP += NextLevelXP + Trinity.Player.ParagonCurrentExperience;
}
else // We have not leveled up
{
TotalXP += NextLevelXP - Trinity.Player.ParagonExperienceNextLevel;
}
}
LastXP = Trinity.Player.ParagonCurrentExperience;
NextLevelXP = Trinity.Player.ParagonExperienceNextLevel;
}
P.S. Let me know if this doesn't fix it. All of my tests indicated the information was now correct, but I'm just one person with limited testing time.
Last edited:






