Restless Souls/Wishlist: Difference between revisions

m
→‎HUD: simplified health calculation (no ONGS OverhealthHypoStrength included)
m (→‎HUD: let's build an health bar animation ... yay ... errr ... the long way)
m (→‎HUD: simplified health calculation (no ONGS OverhealthHypoStrength included))
Line 477: Line 477:
* health gain animation speed is determined by [[XML:ONCC#.3CInventoryConstants.3E|HypoRegenerationRate in ONCC]]
* health gain animation speed is determined by [[XML:ONCC#.3CInventoryConstants.3E|HypoRegenerationRate in ONCC]]
* overpower health gain animation has an overpower sound of an approximate volume of 75% while overpower sound is played at 100% volume once overpower gain ended and drops again
* overpower health gain animation has an overpower sound of an approximate volume of 75% while overpower sound is played at 100% volume once overpower gain ended and drops again
'''Simplified pseudo code for health calculation'''
Demonstrated on Oni 1 health values...
: NormalMax - Current = Dif
: Potential = HypoStrength * NormalMax
: Rest = Potential - Dif
: if Rest < 0 then
:: New = Current + Potential
: if Rest => 0 then
:: New = Current + Dif + Rest/HypoStrength
* Normal max. health = 200
* Overhealth max. = 400
* HypoStrength = 0.25
Example 1
: NM(200) - C(149) = Dif(51)
: P = 0.25 * 200 = 50
: R = (P)50 - D(51) = -1
: R < 0 = true
:: New = (C)149 + (P)50 = 199
Example 2
: NM(200) - C(150) = Dif(50)
: P = 50
: R = P(50) - D(50) = 0
: R < 0 = false
:: New = C(150) + D(50) + R(0)/0.25
:: New = 150 + 50 + 0 = 200
Example 3
: NM(200) - C(200) = Dif(0)
: P = 50
: R = P(50) - Dif(0) = 50
: R < 0 = false
:: New = C(200) + D(0) + R(50)/0.25
:: New = 200 + 0 + 200 = 400




8,018

edits