Table of Contents

Namespace FishMMO.Shared.Core

Classes

BaseAction

Abstract base class for all ECA actions. Serialized inline via [SerializeReference] on Trigger assets. Derive from this class and add [Serializable] to create concrete actions.

BaseCondition

Abstract base class for all ECA conditions. Serialized inline via [SerializeReference] on Trigger assets. Derive from this class and add [Serializable] to create concrete conditions.

Concrete classes implement Evaluate(ICharacter, EventData) with their plain pass/fail logic. Framework code (TriggerExecution, TargetSelector, CompositeCondition) should call Check(ICharacter, EventData) instead — it wraps Evaluate(ICharacter, EventData) and applies the universal Invert flag.

CompositeCondition

Condition that evaluates a list of sub-conditions using AND or OR logic. Serialized inline via [SerializeReference].

EcaAuthority

The single answer to "may this ECA step change authoritative state, here, on this peer?".

EventData

Container for event-related data in the ECA trigger system.

Carries three first-class fields so triggers, conditions and actions never have to hunt through typed sub-payloads to find the basic identities involved in an event:

  • Initiator — the single character that started the trigger (immutable).
  • Target — the GameObject the trigger is acting on (mutable; set by selectors / collision dispatch).
  • TargetCharacter — the ICharacter on Target, when one exists.
  • RNG — optional deterministic RNG carried alongside hit events.

Phase-specific data (collision, tick, spawn, damage amount, …) is still stored as typed sub-payloads accessible via TryGet<T>(out T).

IBoundary

Abstract MonoBehaviour for defining scene boundaries. Provides methods to get offset and size of the boundary.

ICharacterAttributeControllerExtensions

Extension methods for ICharacterAttributeController that provide convenience accessors for resource attribute percentages. These are derived from the interface's TryGet methods and do not require implementation-specific knowledge.

IPlayerCharacterExtensions

Convenience accessors derived from IPlayerCharacter's own state.

Trigger

A trigger executes a list of actions against a set of targets selected by TargetSelector, branching on whether Conditions are satisfied for each selected target.

Lifecycle (per fire):

  1. Caller builds an EventData and invokes Execute(EventData).
  2. TargetSelector yields N targets (using Initiator / Target as context).
  3. For each target, the trigger forks eventData with the new target, evaluates conditions, and runs the matching action branch.

The Initiator never changes during the trigger's lifecycle.

TriggerExecution

Shared helpers for evaluating trigger conditions and executing trigger action lists. All helpers honor optional per-condition / per-action TargetSelector and TargetSelector fan-out.

WorldLabel

A piece of text anchored to a position in the world, rendered by whatever UI layer is present rather than by a renderer of its own.

Interfaces

IAIController

Composite interface for AI controllers managing NPC navigation, state transitions, and movement logic. Inherits from IAINavigation, IAIStateMachine, and IAIWaypoints for interface segregation. Consumers that only need navigation, state management, or waypoints should depend on the corresponding sub-interface instead.

IAINavigation

Interface for AI navigation — controlling agent movement, stopping, and resuming. Separated from IAIController to satisfy ISP: consumers that only need navigation can depend on this smaller contract.

IAIStateMachine

Interface for AI state management — querying and transitioning between AI states. Separated from IAIController to satisfy ISP: consumers that only need state transitions can depend on this smaller contract.

IAIWaypoints

Interface for AI waypoint management — patrolling and picking waypoints. Separated from IAIController to satisfy ISP: consumers that only need waypoint logic can depend on this smaller contract.

IAbilityController

Interface for ability controllers, managing ability activation and state. Inherits from IAbilityKnowledgeController for known ability/event management. Consumers that only need to query or modify known abilities should depend on IAbilityKnowledgeController instead for better interface segregation.

IAbilityCrafter

Server-side interface for ability crafter interactables. Marker interface used for type-safe handler resolution and ability crafter validation.

IAbilityKnowledgeController

Interface for ability knowledge management — tracking known abilities, base abilities, and ability events. Separated from IAbilityController to satisfy ISP: consumers that only need to query or modify known abilities can depend on this smaller contract instead of the full activation interface.

IAbortableAction

Opt-in interface for actions that can meaningfully fail at runtime (e.g. insufficient resources, missing controllers, validation rejection). When combined with StopChainOnFailure, returning false aborts the rest of the action chain for the current event. Most actions don't need this — their Execute(ICharacter, EventData) implementation simply runs and returns; only implement IAbortableAction when there is a genuine fail-and-bail outcome.

IAchievementController

Interface for a character's achievement controller, handling achievement progress, queries, and related events.

IAction

Interface for executable actions in FishMMO. Defines the contract for action execution.

IArchetypeController

Interface for a character's archetype controller, providing access to the current archetype template and events for archetype changes.

IBankController

Interface for bank controllers, managing currency and item slots for a character's bank. Extends character behaviour and item container functionality.

IBanker

Server-side interface for banker interactables. Marker interface used for type-safe handler resolution and banker validation.

IBindstone

Server-side interface for bindstone interactables. Marker interface used for type-safe handler resolution and bindstone validation.

IBuffController

Interface for a character's buff controller, handling application, removal, and events for buffs and debuffs.

ICapturePoint

Server-side interface for capture point interactables. Exposes state, ownership, and capture logic needed by the interaction handler.

ICharacter

Interface for a character entity in the game world. Defines core properties, state management, and behaviour registration for all character types.

ICharacterAttributeController

Interface for character attribute controllers, providing access and management for all character attributes and resources. Used to read, modify, and synchronize attribute and resource values for a character.

ICharacterBehaviour

Interface for character behaviour components that can be registered to a character. Defines lifecycle methods for initialization and client state changes.

ICharacterDamageController

Interface for character damage controllers, providing damage, healing, and death logic for a character. Includes static events for global damage/heal/kill notifications and resource management properties.

IChatHelper

Interface for chat helper functionality, providing methods for handling chat commands and processing messages for each chat channel.

ICondition

Interface for condition evaluation in FishMMO. Defines the contract for condition checks.

IContainer

Server-side interface for container interactables (chests, wardrobes, crates, etc.). The concrete type also implements IItemContainer for item storage operations.

ICooldownController

Interface for a cooldown controller using immutable CooldownInstance based on StartTick + DurationTicks. No per-tick mutation is needed — cooldowns are evaluated via (currentTick - StartTick) < DurationTicks.

IDamageable

Interface for entities that can receive damage from attacks. Implement this to allow objects to be damaged by characters or other sources.

IDialogueInteractable

Server-side interface for dialogue interactables. Exposes the dialogue template needed by the interaction handler and dialogue session management.

IDungeonEntrance

Server-side interface for dungeon entrance interactables. Exposes the dungeon name needed by the dungeon finder system.

IEquipmentController

Interface for equipment controllers, managing equip/unequip logic and activation of equipment slots. Extends character behaviour and item container functionality.

IEquippable<T>

Interface for objects that can be equipped and unequipped by an owner of type T. Implement this to allow items or entities to be equipped by a character or other owner.

IFactionController

Interface for faction controllers, providing access and management for all faction relationships and reputation values. Used to read, modify, and synchronize faction standings for a character.

IFloatValueProvider

Interface for polymorphic float value providers used by ECA actions. Implementations are serialized inline via [SerializeReference] with [SubclassSelector] for Inspector support. Allows actions to derive their float values from constants, random ranges, character stats, or other sources.

IFriendController

Interface for friend controllers, providing access and management for a character's friend list. Used to add, remove, and track friends, and handle related events.

IGatheringNode

Server-side interface for gathering node interactables. Exposes the template, remaining uses, and despawn capability needed by the interaction handler.

IGuildController

Interface for a character's guild controller, handling guild membership and events.

IHealable

Interface for entities that can be healed by a character or other source. Implement this to allow objects to receive healing.

IIntValueProvider

Interface for polymorphic integer value providers used by ECA actions. Implementations are serialized inline via [SerializeReference] with [SubclassSelector] for Inspector support. Allows actions to derive their integer values from constants, random ranges, character stats, or other sources.

IInventoryController

Interface for inventory controllers, managing activation and slot swapping logic for a character's inventory. Extends character behaviour and item container functionality.

IItemContainer

Interface for item containers, providing methods and events for managing items and slots. Used for inventories, equipment, banks, and other item storage systems.

IKillable

Interface for entities that can be killed by a character or other source. Implement this to allow objects to be killed and trigger death logic.

ILootableCorpse

A dead NPC that players may loot: an interactable whose contents were rolled once, at death, and are shared between everyone who earned rights to them.

ILoreObject

Server-side interface for lore object interactables. Exposes the lore template needed for granting abilities, events, and items on interaction.

IMailbox

Server-side interface for mailbox interactables. Marker interface used for type-safe handler resolution and mailbox validation.

IMerchant

Server-side interface for merchant interactables. Exposes the merchant template needed for purchase validation and item/ability sales.

IPartyController

Interface for controllers managing party membership, invites, and rank for a character.

IPetController

Interface for controllers that manage pet entities, including summoning and destruction events.

IPlayerCharacter

Interface for player-controlled character entities, extending ICharacter with player-specific properties and methods. Includes networking, instance, race, chat, hotkey, and teleportation features.

IQuestController

Interface for controllers that manage quest instances and lifecycle for a character.

IQuestInteractable

Server-side interface for quest interactables. Exposes the list of quest templates available from this NPC.

IResourceCost

Interface for conditions that represent a resource cost. Used by the ability system to aggregate total resource costs across all activation conditions and events.

IShrine

Server-side interface for shrine interactables. Exposes the shrine template needed for healing and buff application.

ISpawnable

Interface for spawnable entities managed by an ObjectSpawner. Provides access to spawner, settings, network object, unique ID, and despawn logic.

IStackable<T>

Interface for objects that can be stacked together, such as items or resources. Provides methods for stack management and splitting.

ISwitch

Server-side interface for switch interactables. Exposes the switch target and toggle behaviour needed by the interaction handler.

ITargetController

Interface for a character's target controller, handling targeting logic and events.

ITeleporter

Server-side interface for teleporter interactables. Exposes the target transform needed for same-scene teleportation.

ITooltip

Interface for objects that provide tooltip information for UI display. Provides icon, name, and formatted tooltip text.

IWorldItem

Server-side interface for world item interactables. Exposes the item template, stack amount, and despawn capability needed by the interaction handler.

Enums

CombatContributionKind

How a character earned a share of another character's death.

ConditionOperator

Operator for composite conditions: AND (all must pass) or OR (at least one must pass).

ConditionTargetCombine

How a BaseCondition with a TargetSelector combines per-target evaluation results.

EcaAuthority.PeerEvidence

What the event was able to prove about the peer it is executing on.