Table of Contents

Class BaseAbilityTemplate

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Abstract base ScriptableObject for ability templates, providing common fields, activation conditions, and tooltip logic. Ability requirements (resources, faction, archetype, attributes) are defined as ECA conditions on the ActivationConditions list rather than as hardcoded fields.

public abstract class BaseAbilityTemplate : CachedScriptableObject<BaseAbilityTemplate>, ICachedObject, ITooltip
Inheritance
Object
ScriptableObject
BaseAbilityTemplate
Implements
Derived
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.name
Object.hideFlags

Fields

ActivationConditions

Conditions that must be met to activate this ability. Use ECA conditions such as HasResourceCondition, HasRequiredAttribute, HasFactionCondition, and IsArchetypeCondition to define activation requirements. Resource conditions implementing IResourceCost are aggregated for total cost validation.

[Header("Activation Conditions")]
[Tooltip("Conditions that must be met to activate this ability (resource costs, attribute requirements, faction, archetype, etc.).")]
[SerializeReference]
public List<BaseCondition> ActivationConditions

Field Value

List<BaseCondition>

ActivationTime

Time required to activate the ability.

[Min(0)]
public float ActivationTime

Field Value

float

Remarks

Clamped at zero in the inspector. An ability's activation window is ceil(ActivationTime / TickDelta) assigned to an unsigned tick counter, so a negative value authored here does not mean "instant" — it produces a negative ceiling that wraps to a cast of roughly four billion ticks that never finishes. Zero is a legitimate value and means instant; anything below it is only ever a typo.

Cooldown

Cooldown time for the ability.

public float Cooldown

Field Value

float

Description

Description of the ability.

public string Description

Field Value

string

LifeTime

Lifetime of the ability effect.

public float LifeTime

Field Value

float

Price

Crafting price of the ability (in-game currency).

public int Price

Field Value

int

Speed

Speed of the ability effect.

public float Speed

Field Value

float

Properties

Icon

The icon representing the ability (loaded at runtime on client).

public Sprite Icon { get; }

Property Value

Sprite

Name

The name of the ability (from the ScriptableObject name).

public string Name { get; }

Property Value

string

Methods

BuildTooltip(TooltipBuilder, List<ITooltip>)

Populates the tooltip builder with this ability's tooltip lines. Includes name, description, stats, conditions, and price. When a combine list is provided, aggregates stats and descriptions from combined events/templates.

public virtual void BuildTooltip(TooltipBuilder builder, List<ITooltip> combineList = null)

Parameters

builder TooltipBuilder

The tooltip builder to populate.

combineList List<ITooltip>

Optional list of tooltips to combine (for ability crafting).

OnLoad(string, string, int)

Called when the ability template is loaded into cache. Loads the icon sprite on the client.

public override void OnLoad(string typeName, string resourceName, int resourceID)

Parameters

typeName string

The type name of the resource.

resourceName string

The resource name.

resourceID int

The resource ID.

OnUnload(string, string, int)

Called when the ability template is unloaded from cache. Releases the icon sprite on the client.

public override void OnUnload(string typeName, string resourceName, int resourceID)

Parameters

typeName string

The type name of the resource.

resourceName string

The resource name.

resourceID int

The resource ID.

Tooltip()

Returns the tooltip string for the ability.

public virtual string Tooltip()

Returns

string