Table of Contents

Class AIAbilityRotation

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

ScriptableObject that defines an ordered list of ability entries with conditions. Attach to an AIController to give NPCs intelligent, designer-driven ability selection instead of (or in addition to) the default scoring-based picker.

In Priority mode, entries are evaluated top-to-bottom and the first match wins — ideal for conditional behaviour such as "use Heal when health ≤ 40%, else use Fireball".

In Sequence mode, the NPC advances through the list in order, trying the next entry each evaluation — ideal for structured rotations such as "Fireball → Frost Bolt → Pyroblast → repeat".

[CreateAssetMenu(fileName = "New AI Ability Rotation", menuName = "FishMMO/Character/NPC/AI/Ability Rotation")]
public class AIAbilityRotation : ScriptableObject
Inheritance
Object
ScriptableObject
AIAbilityRotation
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

Entries

Ordered list of ability entries. In Priority mode, higher entries have higher priority. In Sequence mode, entries are cycled through in order.

[Tooltip("Ordered ability entries. Priority: first match wins. Sequence: cycled in order.")]
public List<AIAbilityRotationEntry> Entries

Field Value

List<AIAbilityRotationEntry>

FallbackToDefault

When true, if no rotation entry matches, the caller should fall back to the default scoring-based ability picker. When false, returns null (NPC waits/repositions).

[Tooltip("If no entry matches, fall back to the default ability picker.")]
public bool FallbackToDefault

Field Value

bool

Mode

How entries are evaluated.

[Tooltip("Priority = first match wins. Sequence = cycle through list in order.")]
public AIRotationMode Mode

Field Value

AIRotationMode

Methods

Evaluate(AIController, IAbilityController, ICooldownController, ICharacter, ICharacter)

Evaluates the rotation and returns the best ability to use, or null if no entry matches.

public Ability Evaluate(AIController controller, IAbilityController abilityController, ICooldownController cooldownController, ICharacter self, ICharacter target)

Parameters

controller AIController

The NPC's AI controller.

abilityController IAbilityController

The NPC's ability controller.

cooldownController ICooldownController

The NPC's cooldown controller.

self ICharacter

The NPC's character.

target ICharacter

The NPC's current target character (may be null).

Returns

Ability

The ability to activate, or null if no entry matches.