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
Extension Methods

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

AppendConditions(TooltipContent, List<BaseCondition>)

Writes a condition list as resource costs and requirements.

public static void AppendConditions(TooltipContent content, List<BaseCondition> conditions)

Parameters

content TooltipContent

The content being assembled.

conditions List<BaseCondition>

The conditions to describe.

Remarks

Shared by every template and event that carries conditions, so a resource cost reads the same wherever it is written. Conditions implementing IResourceCost are costs; everything else with wording is a requirement.

BuildTooltip(TooltipContent)

Writes this template's own description: what it is, what it costs, what it needs.

public virtual void BuildTooltip(TooltipContent content)

Parameters

content TooltipContent

The content being assembled.

Remarks

Only the template itself. A base ability that a player will craft effects onto is described by AbilitySummary, which knows about the effects bundled into the template as well as the ones the player chose — this override serves the plain templates that are not abilities, such as an ability-type override event.

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.