Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#631884 18/10/17 02:42 AM
Joined: Oct 2017
J
stranger
OP Offline
stranger
J
Joined: Oct 2017
So I've been tinkering around with the values that you can see in the editor (Base 18, exp 1.28, Lin 12.5) and I can't put an equation together with these values that correctly gives the true health stated from in game.

The values from in game from LV1-8 are:
[list]
[*]Lv1: 30
[*]Lv2: 45 delta 15
[*]Lv3: 65 delta 20
[*]Lv4: 85 delta 20
[*]Lv5: 110 delta 25
[*]Lv6: 135 delta 25
[*]Lv7: 165 delta 30
[*]Lv8: 200 delta 35

[/list]
I was only looking at the values before the lv 9 jump and constitution at 10 (this is because 10 constitution states no modifier where 9 is a negative and 11 is a positive so I'm assuming 10 is assumed net zero) I also took these from a GM mode character so that may have given me incorrect values, however I'm unsure why it would.

The closest that makes sense is 18*(1.28^(level-1))*12.5

However it seems like some weird rounding is being done to always make the value a 5 or zero ending.

Anyone able to shed some light on this?

Joined: Oct 2017
J
stranger
OP Offline
stranger
J
Joined: Oct 2017
18*(1.28^(level-1))+12.5(level) was the closest equation, should have looked off my notes rather than memory.

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
The formula is indeed like that. All variables below whose name starts with str come from data, I believe.

First you have:
Code
exponentialMultiplier = strVitalityExponentialGrowth^(level-1)


Then there are several levels at which the exponential curve changes:
Code
if level >= strFirstVitalityLeapLevel
  exponentialMultilier *= strFirstVatlityLeapGrowth / strVitalityExponentialGrowth

(same for second, third and fourth leap levels)

Then
Code
base = (strVitalityStartingAmount * exponentialMultiplier + strVitalityLinearGrowth) * level

Finally this value is indeed rounded to the closest multiple of 5 for pure aesthetic reasons.

Note that this is merely a snapshot in time of the formula. It's not even from the latest code version (don't have it handy), so it may have already changed in the mean time. It's just to give you an idea.


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5