Class StatScaledFloatValue
Float value provider that scales a character attribute's final value by a configurable factor.
Reads the initiator's (or event target's) attribute and returns Attribute.FinalValue * ScaleFactor.
[Serializable]
public sealed class StatScaledFloatValue : IFloatValueProvider
- Inheritance
-
StatScaledFloatValue
- Implements
- Inherited Members
Fields
AttributeTemplateID
The character attribute to read the value from (e.g., Strength, Intelligence).
[Tooltip("The character attribute to scale from (e.g., Strength, Intelligence).")]
[TemplateReference(typeof(CharacterAttributeTemplate))]
public int AttributeTemplateID
Field Value
ScaleFactor
The multiplier applied to the attribute's final value.
[Tooltip("The multiplier applied to the attribute's final value.")]
public float ScaleFactor
Field Value
SourceSelector
Selector that determines which character's attribute to read. When unset, reads from the current event target (or initiator if no target). Uses the first selected target that has an ICharacter component.
[Tooltip("Selector that picks the source character whose attribute is read. When unset, uses the current event target or initiator.")]
[SerializeReference]
public TargetSelector SourceSelector
Field Value
Methods
GetValue(ICharacter, EventData)
Computes and returns the float value for the current execution context.
public float GetValue(ICharacter initiator, EventData eventData)
Parameters
initiatorICharacterThe character initiating the action (used for stat lookups, etc.).
eventDataEventDataThe event data for the current execution (used for RNG, target info, etc.).
Returns
- float
The computed float value.