StatValue

TOCK by NullSave\Stats Cog\Scripts\Support\StatValue.cs

Creation: Tools -> NullSave Stats Cog -> New Stat Value

Description

Contains the actual value of a stat, including any StatModifiers that are being applied.

Properties

ActiveModifiersReturns list of active StatModifiers
CurrentBaseMaximumGets current maximum value without modifiers
CurrentBaseMinimumGets current minimum value without modifiers
CurrentBaseRegenAmountGets current regen amount without modifiers
CurrentBaseRegenDelayGets current regen delay without modifiers
CurrentBaseValueGets current value without modifiers
CurrentMaximumGets current maximum value including modifiers
CurrentMinimumGets current minimum value including modifiers
CurrentRegenAmountGets current regen amount including modifiers
CurrentRegenDelayGets current regen delay including modifiers
CurrentValueGets current value including modifiers
enableIncrementWhen true value to stat will automatically increment based on conditions
enableRegenValue will regenerate over time when true
incrementAmountAmount to increment stat by (literal or equation)
incrementWhenEquation for when stat should increment
InitializedReturns true when initialized
maxValueMaximum value (literal or equation)
minValueMinimum value (literal or equation)
ParentReturns StatsCog owning this stat
regenDelayTime to wait after value drop before regenerating (literal or equation)
regenPerSecondAmount to regenerate each second (literal or equation)
startWithMaxValueValue is set to max at start when true
valueValue of stat (literal or equation)

Methods

AddModifierAdds a StatModifier
InitializeInitializes the stat
LoadLoads data from a stream
RemoveModifierRemoves a StatModifier
SaveSaves data to a stream
SendCommandSends a command to the parent StatCog
UpdateUpdates the stat

Events

onBaseMaxValueChangedFired when the maximum value changes
onBaseMinValueChangedFired when the minimum value changes
onBaseValueChangedFired when the value changes
onInitFired when the stat is initialized or loaded from a stream
onMaxValueChangedFired when the maximum value with applied modifiers changes
onMinValueChangedFired when the minimum value with applied modifiers changes
onValueChangedFired when the value with applied modifiers changes