Guest User

TMF stunt score calculation by blackq

a guest
Jun 20th, 2022
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. ===== Trackmania Forever stunt score calculation, reverse-engineered by blackq =====
  2.  
  3. This is a complete breakdown of stunt score calculation directly extracted from
  4. the game. It aims at giving you a deeper understanding of stunt mode, clearing up
  5. common misconceptions and ultimately making you a better stunter.
  6.  
  7. === Technical stuff ===
  8.  
  9. Decompiled stunt score calculation method: https://pastebin.com/kN3wwrDW
  10.  
  11. Human-readable python script for calculating stunt scores: https://pastebin.com/Qr3wTq07
  12.  
  13. Example usage:
  14.  
  15. $ python -m calculate_stunt_score --help
  16. $ python -m calculate_stunt_score --figure SPINNING_CHAOS --airtime 15000 --spin 15 --flip 0 --roll 0 --chain 34 --figure-received-points 100 --straight
  17. 564
  18.  
  19. === How the actual stunt is determined ===
  20.  
  21. The stunt is purely determined by how much your car rotated around three axes: spin, flip and roll axis.
  22.  
  23. Some stunts have very similar axis weight distributions, so the game might give you inaccurate results
  24. when your car bugs or your airtime is too low. Here are the similar stunts and how they are determined:
  25.  
  26. - Spin, Aerial and Alley
  27. - roll and flip amount close to zero
  28. - yields a spin if initial flip rotation is below a certain threshold
  29. - otherwise
  30. - yields an alley if rotation direction does not match the translation direction
  31. - otherwise yields an aerial if the opposite of the above happens
  32. - otherwise yields an alley as a fallback; from my observations, usually
  33. triggered when aiming for an aerial but turning in too much
  34.  
  35. - Backflip, Flip, Rodeo and Corkscrew
  36. - roll amount close to zero
  37. - yields a backflip if spin amount close to zero and flip amount is negative
  38. - otherwise yields a flip if spin amount close to zero and flip amount is positive
  39. - otherwise yields a rodeo if spin amount lower than flip amount
  40. - otherwise yields a corkscrew
  41.  
  42. - Roll, Twister and Spin Off
  43. - flip amount close to zero
  44. - TIP: holding the brake can prevent a flip amount; use for skillfully making twisters and spin offs!!!
  45. - yields a roll if spin amount close to zero
  46. - otherwise yields a twister if spin amount lower than roll amount
  47. - otherwise yields a spin off
  48.  
  49. - Free Style and Flip Flap
  50. - spin amount close to zero
  51. - yields a freestyle if flip amount lower than roll amount
  52. - otherwise yields a flipflap
  53.  
  54. - Flipping Mix, Spinning Chaos and Rolling Madness
  55. - fires when at least two of the axes have significant rotation
  56. - yields a rolling madness if roll axis is sufficiently high enough
  57. - otherwise
  58. - yields a flipping mix if spin amount lower than flip amount
  59. - otherwise yields a spinning chaos
  60.  
  61. - Basic Jump and Wrecks
  62. - if collision detection determined that part of your chassis hit an object, a wreck
  63. is generated; the wreck type depends on the rotation values
  64. - otherwise, if no other condition fired, defaults to a basic jump
  65.  
  66. === How a straight and master stunt is determined ===
  67.  
  68. Your stunt is considered straight if your car is angled in the same way as it was at the beginning of the stunt.
  69. The combined tolerance for this angle is roughly 15 degrees.
  70.  
  71. Your stunt is considered master if it is straight AND you pressed the exact same keys throughout the entire stunt.
  72.  
  73. Basic jumps cannot be master and the wrecks can neither be master nor straight.
  74.  
  75. === How the base score is calculated ===
  76.  
  77. A common misconception among stunt players is that each stunt has a fixed "base point"
  78. value. That, however, is not true. The base points are a combination of airtime and the
  79. three axes rotations. Since SC, RM and FM use all three axes, they yield higher scores than
  80. FF, FS, Rodeo and Corkscrew (which use two axes), which in turn yield higher scores than
  81. BF, Flip, Spin, Aerial and Alley (which use only one axis).
  82.  
  83. The calculation is as follows, where "airtime" is the airtime in milliseconds divided
  84. by 100 and "xxx_amount" defines the amount of 180 degree rotations:
  85. > airtime + flip_amount * 15 + (spin_amount + roll_amount * 2) * 10;
  86.  
  87. Stunts that influence the base score:
  88. - alley is hardcoded to have a bonus of 5 points. how generous ;)
  89. - basic jumps and wrecks halve your points
  90.  
  91. What do we learn from this?
  92. - the more airtime, the more points (in a linear fashion)
  93. - the game favors flip and roll stunts
  94. - fixed base points are an illusion!
  95.  
  96. === How the straightness and master bonus is calculated ===
  97.  
  98. A multiplier times 1.5 for master and times 1.25 for straight stunts.
  99.  
  100. Try to master or at least straighten all your stunts.
  101.  
  102. === How the chain bonus is calculated ===
  103.  
  104. - having any chain adds 0.2 to the multiplier.
  105. - a chain greater than or equal two adds 0.15 to the multiplier
  106. - a chain greater than or equal three adds 0.1 to the multiplier
  107. - a chain greater than or equal four adds 0.05 to the multiplier
  108. - a chain greater than or equal five adds 0.02 for each additional chain to the multiplier
  109.  
  110. Hold your chain, it's essential to getting high scores. And try to have at least a
  111. single chain before going for any high-scoring stunts.
  112.  
  113. === How the stunt repeat malus is calculated ===
  114.  
  115. The game stores a table of all points you ever received for all stunts. The higher
  116. the table entry for any given stunt is, the bigger the penalty.
  117. > total_points_received * 0.2 / 100.0
  118.  
  119. Repeating big stunts is bad.
  120.  
  121. === How the final score is calculated ===
  122.  
  123. > base_points_with_penalty = round(base_points * (1.0 - malus))
  124. > bonuses = chain_bonus + straightness_master_bonus
  125. > final_multiplier = round(base_points_with_penalty * bonuses)
  126.  
  127. Hope this document was of use to you.
Advertisement
Add Comment
Please, Sign In to add comment