Character Stats
Kryzarel
$0.00
Date |
Price |
---|---|
日期和时间 |
价钱($) |
08/30(2018) |
0.0 |
11/19(2024) |
0.0 |
Jump AssetStore
If you want Stats (aka Attributes) to be affected by items, spells, skills or something else entirely.
Whether you want to modify your stat by +5, +10% or -27.5%, this system keeps it all neatly organized and accurately calculates the stat's value.
Just declare a CharacterStat variable, set its BaseValue, and then AddModifier() to your heart's content.
Get the stat's final value from the Value property.
Mix and match flat and percentual modifiers in any order you want:
1) For a base value of 10, add +100 and +10% modifiers for a total of 121. Or reverse the order of calculation to get a total of 111. (Independent of when they are gained in-game)
2) Add two 50% modifiers stacking additively for a total of +100%. Or make them stack multiplicatively for a total of +125%.
3) Do whatever the heck you want! Full source code included. All classes are fully extendable: all variables are protected or public; all methods are virtual.
The package consists of two main scripts: CharacterStat and StatModifier. There's also a few example scenes included.
YouTube Channel: youtube.com/c/kryzarel
Other Links:
Discord Channel - Contact me directly.
Character Stats YouTube Tutorial - Showing how to implement this asset from scratch.
Character Stats Text Tutorial - Text version of the same tutorial.
Fantasy Icon Pack By Ravenmore:
Author's site: http://dycha.net
Downloaded from:
OpenGameArt
Under license: CC BY 3.0