Table of Contents

Class FactionMatrixTemplate

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

ScriptableObject template containing a matrix of alliance levels between all factions. Provides editor tools for rebuilding the matrix and propagating relationships to individual faction templates.

[CreateAssetMenu(fileName = "New Faction Matrix", menuName = "FishMMO/Character/Faction/Faction Matrix", order = 1)]
public class FactionMatrixTemplate : CachedScriptableObject<FactionMatrixTemplate>, ICachedObject
Inheritance
Object
ScriptableObject
FactionMatrixTemplate
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

Fields

Factions

List of all faction templates included in this matrix. Used to define the set of factions and their relationships.

public List<FactionTemplate> Factions

Field Value

List<FactionTemplate>

Matrix

The matrix of alliance levels between all factions in Factions.

public FactionMatrix Matrix

Field Value

FactionMatrix

Properties

Name

The display name of this faction matrix (from the ScriptableObject's name).

public string Name { get; }

Property Value

string

Methods

RebuildFactions()

Rebuilds the default relationships (allied, neutral, hostile) for each faction based on the matrix values. Clears existing relationships and sets new ones according to the alliance level in the matrix.

public void RebuildFactions()

RebuildMatrix()

Rebuilds the faction matrix by loading all FactionTemplate assets using Addressables. Initializes the Factions list and creates a new Matrix with default relationships.

public void RebuildMatrix()