- Stat (simple stat)
- Modfier
- Resource
- Multistat
stat components
---------------
B - base value
R - raw modifier
F - final modifier
modifier types
---------------
f - flat
m - multiplier
raw value formula
-----------------
R = (B + Rf) * Rm
Rf = Rf(a) + Rf(l) + Rf(g) + … + Rf(x)
Rm = Rm(a) + Rm(l) + Rm(g) + … + Rm(y)
final value formula
-------------------
F = (R + Ff) * Fm
Ff = Ff(a) + Ff(l) + Ff(g) + …. + Ff(x)
Fm = 1 + Fm(a) + Ff(l) + Ff(g) + … + Ff(x)
JSON serialization supported with SaladLab fork of Newtonsoft Json.NET. You can get latest DLL file from here.
Private setter serialization supported with custom contract resolver method as described in Daniel's blog.
Yaml serialization supported with YamlDotNet. Get latest release dll from here.
BaseStatData.ToJSON()
method only serializes public properties and doesn't allow to serialize memebers.- Is
BaseStatData
needed? CanStat
be serialized directly? - Applying global modfier to multiple stats of same type not supported. Eg. improved melee damage should apply to all melee damage type stats: sword damage, axe damage, etc.
- What is the reason of using final stat modfier (F)? Is it needed at all?