Improved initial player level computation and health points formula

Mehdi Yousfi-Monod requested to merge mym34/ncgdmw-lua-mym:master into master
  • level computation

    • Current level computation is based on vanilla races and birth signs, it might fail with some mods, like starting a new character at level 3 instead of 1 or changing the current level of an existing save.
    • Now on first Update(), the current player level as well as current skill values will be used to ensure the level is preserved and the level progression will be as close as previous one.
    • There is no more the arbitrary 25 value to determine the level.
  • health points

    • Current computation is very different from vanilla one. It gives you more HP on low levels, and far less on high levels, preventing the player to survive with high level creatures and mods.
    • Now the HP is the sum of a base value, keeping the End+Str/2+Wil/4 spirit, plus 10% of that value multiplied by the level minus 1. Similarly to what did Talrivian's State-Based HP mod.
    • New HP formula: (End*4+Str*2+Wil)/7 + (level - 1) * ((End*4+Str*2+Wil)/7)/20
    • Also, HP are now recalculated when your level changes, in addition to when your health attributes change.
  • messages

    • Removed the UI message saying you've been downgraded to level 1 each time you got your attributes increased during level 1.
Edited by Mehdi Yousfi-Monod

Merge request reports