Aelto / tw3-resources-perks-overhaul

The Witcher 3 - Combat & Perk overhaul
5 stars 0 forks source link

The formula of the speed reduction from missing stamina is wrong #2

Closed Aelto closed 3 years ago

Aelto commented 3 years ago

The formula should follow a logarithmic curve that starts slow and increases faster as stamina goes down.

Current formula:

  // with the default multiplier:
  // 100%: 1
  // 75%: 0.9459379855855781
  // 50%: 0.9164824687669755
  // 25%: 0.89612369213023
  // 15%: 0.886350127184105

Expected result:

  // 100% stamina -> 0% of maximum reduction
  // 90% stamina -> 5% of maximum reduction
  // 80% stamina -> 10% of maximum reduction
  // 70% stamina -> 16% of maximum reduction
  // 60% stamina -> 23% of maximum reduction
  // 50% stamina -> 30% of maximum reduction
  // 40% stamina -> 39% of maximum reduction
  // 30% stamina -> 49% of maximum reduction
  // 20% stamina -> 61% of maximum reduction
  // 10% stamina -> 77% of maximum reduction
  // 0% stamina -> 100% of maximum reduction

where the maximum reduction is 15% less speed multiplied by the slider value. With a slider value of 1, the player gets 15% less speed at 0% stamina, with a slider value of 2 the player gets 30% less speed at 0% stamina. The curve should be the same, only the maximum reduction should be multiplied.