Table of Contents

Class AbilityTemplate

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

ScriptableObject template for defining an ability, including prefabs, triggers, event lists, and requirements.

[CreateAssetMenu(fileName = "New Ability", menuName = "FishMMO/Character/Ability/Ability", order = 1)]
public class AbilityTemplate : BaseAbilityTemplate, ICachedObject, ITooltip
Inheritance
Object
ScriptableObject
AbilityTemplate
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

AbilityObjectPrefab

The prefab for the ability object (visual or functional representation).

public GameObject AbilityObjectPrefab

Field Value

GameObject

AbilitySpawnTarget

The spawn target type for the ability (where the ability effect appears).

public AbilitySpawnTarget AbilitySpawnTarget

Field Value

AbilitySpawnTarget

AdditionalEventSlots

Additional event slots for the ability (for extensibility).

public byte AdditionalEventSlots

Field Value

byte

HitCount

The number of times the ability can hit (e.g., for multi-hit abilities).

public int HitCount

Field Value

int

IntentOverride

Forces this ability's AI intent instead of deriving it from the action graph.

[Header("AI")]
[Tooltip("Leave as None. Only set this when the AI misreads what the ability does — it replaces the derived intent entirely.")]
public AIAbilityIntent IntentOverride

Field Value

AIAbilityIntent

Remarks

Leave at None for the normal case. AIAbilityClassifier reads the ECA actions the ability already carries and works out whether it heals, damages, controls or taunts, so archetypes never name specific abilities.

The override exists for the two cases classification cannot get right on its own: a custom action type it has never heard of, and a buff whose beneficial-or-detrimental nature the attribute-sign heuristic reads backwards. Setting it replaces the derived value entirely rather than adding to it.

OnDestroyEvents

[Tooltip("Ability Events to execute when the ability object is destroyed.")]
public List<AbilityOnDestroyEvent> OnDestroyEvents

Field Value

List<AbilityOnDestroyEvent>

OnHitEvents

[Tooltip("Ability Events to execute when the ability object collides or hits a character.")]
public List<AbilityOnHitEvent> OnHitEvents

Field Value

List<AbilityOnHitEvent>

OnPreSpawnEvents

[Tooltip("Ability Events to execute before the primary ability object is spawned.")]
public List<AbilityOnPreSpawnEvent> OnPreSpawnEvents

Field Value

List<AbilityOnPreSpawnEvent>

OnSpawnEvents

[Tooltip("Ability Events to execute when the primary ability object is spawned.")]
public List<AbilityOnSpawnEvent> OnSpawnEvents

Field Value

List<AbilityOnSpawnEvent>

OnTickEvents

[Header("Event-Condition-Action (ECA) Triggers")]
[Tooltip("Ability Events to execute when the ability object 'ticks' (e.g., moves, applies continuous effects).")]
public List<AbilityOnTickEvent> OnTickEvents

Field Value

List<AbilityOnTickEvent>

RequiresTarget

Whether the ability requires a target to be used.

public bool RequiresTarget

Field Value

bool

Type

The type of the ability (e.g., offensive, defensive, utility).

public AbilityType Type

Field Value

AbilityType

Methods

GetAllAbilityEventIDs()

Returns a cached list of all unique event IDs from all event lists on this template.

public List<int> GetAllAbilityEventIDs()

Returns

List<int>

A list of all unique event IDs used by this ability template.

Tooltip()

Returns the tooltip string for the ability, including type if set.

public override string Tooltip()

Returns

string

The tooltip string for the ability.

TooltipWithEvents(List<ITooltip>)

Returns a tooltip string composed with optional event tooltips, including type if set. Used by ability crafting to preview the composed ability tooltip.

public string TooltipWithEvents(List<ITooltip> combineList)

Parameters

combineList List<ITooltip>

Optional list of event tooltips to combine.

Returns

string

The composed tooltip string.