geri43 / TrackmaniaSeasonPointCalculator

Trackmania Season Point Calculator
2 stars 4 forks source link

More accurate formula #1

Closed zanaptak closed 4 years ago

zanaptak commented 4 years ago

Would you consider updating the formula for this? Currently the calculator points appear to be inflated compared to in-game data.

Based on in-game data and some Excel exploration I derived the following. It appears to be accurate to the exact point value on multiple campaigns I checked in-game (Fall 2020 and some club campaigns). Pseudocode:

tier = ceiling(log10(rank))
if tier < 2 then
  points = 40000/rank
else
  basePoints = 4000 / 2^(tier-1)
  rankMultiplier = 10^(tier-1) / rank + 0.9
  points = basePoints * rankMultiplier

The misunderstanding appears to be that the 10^x values mentioned in your referenced tweet are not actually points on a smooth global curve but rather represent rank tier boundaries, and within each tier there are isolated point curves with an early point dropoff.

Edit: Removed zero-point tier from formula.

geri43 commented 4 years ago

Thanks for the feedback, this is what I couldn't figure out when trying to crack the formula :) I will get back to it later, and update it.

zanaptak commented 3 years ago

Not that it matters I'm sure due to number of players, but for simplicity I removed the zero-point cutoff in the formula above, it was based on some speculation that max of 1 million players get points, but the dev tweets are only mentioning one million as max possible campaign score so I'm not sure a cutoff on the low end exists.

KemTM commented 3 years ago

Sorry for digging this back up again, but I'm now allowed to disclose what I was told by one of Nadeo employees, since the Open Grand League is using it as well. This is moreso for documentation purposes.

@zanaptak's formula is indeed correct, but there is another expression of it. Here's the pseudocode

fun calculate_sp(position):
  tier = ceil(log10(position)) # make sure that there are no floating point errors here that might cause ceil to misbehave

  if tier == 1:
    return round(40000 / position) # make sure you do floating point division here

  A = 4000 * pow(5, tier-1)
  B = 3600 / pow(2, tier-1) # make sure you do floating point division here
  return round(A / position + B)

And here's a spreadsheet to show how it works: https://docs.google.com/spreadsheets/d/1xMf8wuIHbvZGioItZ8R36BXUSDloT356FP0DjIXSXVE/edit#gid=1258500882