Table of Contents

Class ArenaTemplate

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

An arena: the scene it is fought in, its mode, its formats, and its match rules.

[CreateAssetMenu(fileName = "New Arena", menuName = "FishMMO/World/Arena", order = 2)]
public class ArenaTemplate : CachedScriptableObject<ArenaTemplate>, ICachedObject
Inheritance
Object
ScriptableObject
ArenaTemplate
Implements
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

Remarks

The arena counterpart of DungeonTemplate. Referenced by an arena board so the board's panel can describe the arena, and by the match row so the scene server that hosts the instance — not necessarily the one that formed the match — can read the rules.

Team spawn points are ordinary CharacterRespawnPosition objects in the scene whose names start with the team's prefix, e.g. Team1_A. A team without any is spawned at the scene's respawn points at random, which is wrong for an arena but not fatal.

Fields

ArenaSceneName

[Tooltip("Scene name of the arena. Must be a world scene with respawn points.")]
public string ArenaSceneName

Field Value

string

BackfillWindowSeconds

[Tooltip("Seconds after going live during which a vacated seat is filled from the queue. 0 disables backfill.")]
[Min(0)]
public int BackfillWindowSeconds

Field Value

int

BalanceTeams

[Tooltip("Balance teams by rating when composing a match from solo and party units. Uses the season rating for ranked formats and the PvP Rank attribute otherwise.")]
public bool BalanceTeams

Field Value

bool

ControlPointCaptureInteractions

[Tooltip("King of the Hill: interactions with a control point needed to take it. Another team's interaction resets progress.")]
[Min(1)]
public int ControlPointCaptureInteractions

Field Value

int

ControlPointCaptureScore

[Tooltip("King of the Hill: personal score credited to the player who completes a capture.")]
[Min(0)]
public int ControlPointCaptureScore

Field Value

int

ControlPointHoldSecondsPerPoint

[Tooltip("King of the Hill: seconds a control point must be held to score one point for its owner.")]
[Min(1)]
public int ControlPointHoldSecondsPerPoint

Field Value

int

CountdownCues

[Header("Client cues")]
[Tooltip("Triggers fired on each player's client at seconds of the start countdown. 0 fires at the start.")]
public List<ArenaCountdownCue> CountdownCues

Field Value

List<ArenaCountdownCue>

CountdownSeconds

[Header("Timing")]
[Tooltip("Seconds of countdown once every player has arrived.")]
[Min(1)]
public int CountdownSeconds

Field Value

int

DeclineLockMinutes

[Tooltip("Minutes a player is locked out of the arena queue for declining, or not answering, a ready check. 0 for no lock.")]
[Min(0)]
public int DeclineLockMinutes

Field Value

int

Description

[Tooltip("Description shown on the arena board.")]
[TextArea(3, 6)]
public string Description

Field Value

string

DeserterLockMinutes

[Header("Penalties")]
[Tooltip("Minutes a player is locked out of the arena queue for leaving a live match. 0 for no lock.")]
[Min(0)]
public int DeserterLockMinutes

Field Value

int

DisplayName

[Tooltip("Display name shown on the arena board. Defaults to the asset name.")]
public string DisplayName

Field Value

string

DrawRewardTriggers

[Tooltip("Triggers run on the server for every present member when the match is drawn.")]
public List<Trigger> DrawRewardTriggers

Field Value

List<Trigger>

DroppedFlagVisualPrefab

[Tooltip("Capture the Flag: optional prefab placed where a dropped flag lies on clients. Empty uses a simple tinted marker.")]
public GameObject DroppedFlagVisualPrefab

Field Value

GameObject

EventCues

[Tooltip("Triggers fired on each player's client for moments of play: kills, sprees, flags, warnings.")]
public List<ArenaEventCue> EventCues

Field Value

List<ArenaEventCue>

FlagCaptureScore

[Header("Objectives")]
[Tooltip("Capture the Flag: score a team earns per capture.")]
[Min(1)]
public int FlagCaptureScore

Field Value

int

FlagCarrierVisualPrefab

[Tooltip("Capture the Flag: optional prefab attached above a carrier's head on clients. Empty uses a simple tinted marker.")]
public GameObject FlagCarrierVisualPrefab

Field Value

GameObject

FlagDropSeconds

[Header("Flags")]
[Tooltip("Capture the Flag: seconds a dropped flag lies on the ground before returning to its stand by itself.")]
[Min(1)]
public int FlagDropSeconds

Field Value

int

FlagPickupRadius

[Tooltip("Capture the Flag: metres within which a player standing by a dropped flag picks it up (enemy) or returns it (owner).")]
[Min(0.5)]
public float FlagPickupRadius

Field Value

float

Formats

[Tooltip("Formats offered, one tab each. Empty means a single 1v1.")]
public List<ArenaFormat> Formats

Field Value

List<ArenaFormat>

GatheringTimeoutSeconds

[Tooltip("Seconds to wait for every player to arrive before the match starts anyway, or is cancelled if a team is empty.")]
[Min(10)]
public int GatheringTimeoutSeconds

Field Value

int

IconReference

[Tooltip("Artwork shown beside the description on the arena board.")]
public AssetReferenceSprite IconReference

Field Value

AssetReferenceSprite

KillingSpreeThreshold

[Header("Announcer")]
[Tooltip("Kills without dying that count as a killing spree. 0 disables spree announcements.")]
[Min(0)]
public int KillingSpreeThreshold

Field Value

int

LossRankPoints

[Tooltip("PvP rank points removed from every member of a losing team. Rank never drops below zero.")]
[Min(0)]
public int LossRankPoints

Field Value

int

LossRewardTriggers

[Tooltip("Triggers run on the server for every present member of a losing team when the match ends.")]
public List<Trigger> LossRewardTriggers

Field Value

List<Trigger>

MatchEndTriggers

[Tooltip("Triggers fired on each player's client when the match ends, before the results screen.")]
public List<Trigger> MatchEndTriggers

Field Value

List<Trigger>

MatchMinutes

[Tooltip("Match length in minutes once live. 0 means no time limit.")]
[Min(0)]
public int MatchMinutes

Field Value

int

Mode

[Header("Match")]
[Tooltip("What is fought over.")]
public ArenaMode Mode

Field Value

ArenaMode

NearScoreLimitPoints

[Tooltip("Points from the score limit at which the near-limit announcement fires. 0 disables it.")]
[Min(0)]
public int NearScoreLimitPoints

Field Value

int

PlacementGames

[Header("Ranked")]
[Tooltip("Ranked: games a character plays at the placement K-factor before their rating is shown as final.")]
[Min(0)]
public int PlacementGames

Field Value

int

PlacementK

[Tooltip("Ranked: Elo K-factor during placement.")]
[Min(1)]
public int PlacementK

Field Value

int

RatingBandBase

[Tooltip("Ranked: rating band around the longest waiter at zero wait. 0 disables banding.")]
[Min(0)]
public int RatingBandBase

Field Value

int

RatingBandGrowthPerSecond

[Tooltip("Ranked: points the band widens by per second waited.")]
[Min(0)]
public int RatingBandGrowthPerSecond

Field Value

int

RatingBandMax

[Tooltip("Ranked: widest the band ever gets. 0 for no ceiling.")]
[Min(0)]
public int RatingBandMax

Field Value

int

RatingK

[Tooltip("Ranked: Elo K-factor once placed.")]
[Min(1)]
public int RatingK

Field Value

int

ReadyCheckSeconds

[Tooltip("Seconds every player has to accept the ready check once everyone has arrived. 0 skips the check.")]
[Min(0)]
public int ReadyCheckSeconds

Field Value

int

ReconnectGraceSeconds

[Tooltip("Seconds a player who disconnects from a live match may reconnect and keep their seat. 0 forfeits at once.")]
[Min(0)]
public int ReconnectGraceSeconds

Field Value

int

RespawnSeconds

[Tooltip("Seconds a dead player waits before respawning at their team's spawn. 0 means no respawn: an elimination round.")]
[Min(0)]
public int RespawnSeconds

Field Value

int

ResultsSeconds

[Tooltip("Seconds the results screen stays before everyone is returned to the world.")]
[Min(3)]
public int ResultsSeconds

Field Value

int

ScoreLimit

[Tooltip("Team score that ends the match immediately. 0 means play to time.")]
[Min(0)]
public int ScoreLimit

Field Value

int

TeamColors

[Header("Teams")]
[Tooltip("Per team, the colour used for nameplates, target frames, scoreboards and results. Teams beyond the list take the default palette.")]
public List<Color> TeamColors

Field Value

List<Color>

TeamCount

[Tooltip("Teams in a match. Two for every mode shipped so far.")]
[Min(2)]
public int TeamCount

Field Value

int

TeamSpawnPrefixes

[Header("Spawns")]
[Tooltip("Per team, the name prefix of the scene's respawn points that belong to that team.")]
public List<string> TeamSpawnPrefixes

Field Value

List<string>

TimeWarningSeconds

[Tooltip("Seconds left on the clock at which a time warning fires. Empty disables them.")]
public List<int> TimeWarningSeconds

Field Value

List<int>

WinRankPoints

[Header("Rating")]
[Tooltip("PvP rank points awarded to every member of the winning team.")]
[Min(0)]
public int WinRankPoints

Field Value

int

WinRewardTriggers

[Header("Reward hooks (server)")]
[Tooltip("Triggers run on the server for every present member of the winning team when the match ends. Reward systems author these; nothing ships in them.")]
public List<Trigger> WinRewardTriggers

Field Value

List<Trigger>

Properties

FormatCount

How many formats the arena offers. Never below one.

public int FormatCount { get; }

Property Value

int

Icon

Artwork, once loaded on the client. Null on the server and before the load completes.

public Sprite Icon { get; }

Property Value

Sprite

Name

Asset name.

public string Name { get; }

Property Value

string

ResolvedDisplayName

The display name, or the asset name when none is authored.

public string ResolvedDisplayName { get; }

Property Value

string

Methods

DescribeMode(ArenaMode)

Human-readable mode name.

public static string DescribeMode(ArenaMode mode)

Parameters

mode ArenaMode

Returns

string

GetFormatName(int)

Tab name for a format: the authored one, or "NvN".

public string GetFormatName(int index)

Parameters

index int

Returns

string

GetMatchSize(int)

Players in a full match at a format.

public int GetMatchSize(int index)

Parameters

index int

Returns

int

GetTeamColor(int)

The colour a team is drawn in: the authored one, or the default palette's.

public Color GetTeamColor(int team)

Parameters

team int

Returns

Color

GetTeamSize(int)

Seats per team at a format index, or 1 when the arena declares no formats.

public int GetTeamSize(int index)

Parameters

index int

Returns

int

GetTeamSpawnPrefix(int)

The spawn prefix for a team, or null when none is authored for it.

public string GetTeamSpawnPrefix(int team)

Parameters

team int

Returns

string

IsRankedFormat(int)

Whether a format is ranked. Out-of-range formats are unranked.

public bool IsRankedFormat(int index)

Parameters

index int

Returns

bool

IsValidFormat(int)

Whether an index names one of the arena's formats.

public bool IsValidFormat(int index)

Parameters

index int

Returns

bool

OnLoad(string, string, int)

Virtual method called when a ScriptableObject is successfully added to the cache. Derived classes can override this method to add custom logging, initialization, or other specific logic that should occur upon caching.

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

Parameters

typeName string

The name of the type (e.g., "RaceTemplate") under which the object is currently being cached.

resourceName string

The name of the ScriptableObject asset (e.g., "HumanRace").

resourceID int

The deterministic ID generated for the resource instance.

OnUnload(string, string, int)

Virtual method called when a ScriptableObject is successfully removed from the cache. Derived classes can override this method to add custom logging, cleanup, or other specific logic that should occur upon uncaching.

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

Parameters

typeName string

The name of the type (e.g., "RaceTemplate") from which the object is being removed from cache.

resourceName string

The name of the ScriptableObject asset (e.g., "HumanRace").

resourceID int

The deterministic ID of the resource instance.

ResolveTeamColors()

Every team's colour, in team order, for publishing to the team registry.

public Color[] ResolveTeamColors()

Returns

Color[]