Class ResourceTickBuffTemplate
Buff template that applies periodic resource modifications (heal-over-time / damage-over-time). Each tick adds or subtracts from the current value of target resource attributes. The tick amount scales linearly with the number of stacks (base + stacks). This buff is deterministic — identical inputs produce identical state changes.
[CreateAssetMenu(fileName = "New Resource Tick Buff Template", menuName = "FishMMO/Character/Buff/Resource Tick Buff", order = 3)]
public class ResourceTickBuffTemplate : BaseBuffTemplate, ICachedObject, ITooltip
- Inheritance
-
ObjectScriptableObjectResourceTickBuffTemplate
- Implements
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Fields
DamageAttribute
Damage type used to resolve resistance when a tick reduces health.
[Tooltip("Damage type used for resistance when a tick reduces health. Leave empty for true damage.")]
public DamageAttributeTemplate DamageAttribute
Field Value
Remarks
Leave empty for true damage — a null damage type bypasses resistance entirely, which is the right default for environmental and pure-magic effects. Set it to make a poison respect nature resistance, a burn respect fire resistance, and so on.
Ignored by ticks that heal or that target a resource other than health.
TickAttributes
List of resource attribute modifications applied per tick. Positive values heal, negative values deal damage.
[Tooltip("Resource attributes to modify per tick. Positive = heal, negative = damage.")]
public List<BuffAttributeTemplate> TickAttributes
Field Value
Methods
OnApply(Buff, ICharacter)
No immediate effect on apply — all effects are tick-based.
public override void OnApply(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance being applied.
targetICharacterThe character receiving the buff.
OnApplyStack(Buff, ICharacter)
No immediate effect on stack add — stacking increases the tick multiplier.
public override void OnApplyStack(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance being stacked.
targetICharacterThe character receiving the stack.
OnRemove(Buff, ICharacter)
No cleanup needed on remove — tick effects modify current values, not modifiers.
public override void OnRemove(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance being removed.
targetICharacterThe character losing the buff.
OnRemoveStack(Buff, ICharacter)
No cleanup on stack remove — tick multiplier decreases naturally.
public override void OnRemoveStack(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance being unstacked.
targetICharacterThe character losing the stack.
OnTick(Buff, ICharacter)
Called each tick. Applies resource modifications scaled by (1 + Stacks) to the target.
public override void OnTick(Buff buff, ICharacter target)
Parameters
buffBuffThe buff instance.
targetICharacterThe character affected.
Remarks
Health ticks go through the damage pipeline rather than writing the resource directly, so a damage-over-time effect mitigates, generates threat, credits its caster and can actually kill. See ApplyResourceTick(Buff, ICharacter, List<BuffAttributeTemplate>, DamageAttributeTemplate).
SecondaryTooltip(TooltipBuilder)
Appends a secondary tooltip describing the per-tick resource effects.
public override void SecondaryTooltip(TooltipBuilder builder)
Parameters
builderTooltipBuilderThe tooltip builder to populate.