Table of Contents

Class WildlifeTemplate

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

One species of wildlife: its role and the numbers its brain and body use. Referenced by the species' NPC prefab (Wildlife), so server and clients read the same values.

[CreateAssetMenu(fileName = "New Wildlife", menuName = "FishMMO/Character/NPC/Wildlife", order = 0)]
public class WildlifeTemplate : ScriptableObject
Inheritance
Object
ScriptableObject
WildlifeTemplate
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetEntityId()
Object.MemberwiseClone()
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

Wildlife sits outside the faction system: anyone may harm it and it may harm anyone (WildlifeRules), except predators of one pack, which never turn on each other.

Fields

Body

[Header("Body")]
[Tooltip("The procedural body every client builds for this species (WildlifeBodyMesh).")]
public WildlifeBodySpec Body

Field Value

WildlifeBodySpec

CorpseSeconds

[Header("Corpse")]
[Tooltip("Seconds the corpse stays, loot or not, so professions (skinning and the like) can work it.")]
[Min(0)]
public float CorpseSeconds

Field Value

float

DenKinds

[Tooltip("Points of interest a group lives at (a wolf den, a hunting lodge's woods): one group each, bigger than in the open.")]
public List<POIType> DenKinds

Field Value

List<POIType>

DensInCaveMouths

[Tooltip("True to den one group in some cave mouths (bears).")]
public bool DensInCaveMouths

Field Value

bool

FleeLegMetres

[Header("Fleeing (prey)")]
[Tooltip("Prey: how far it puts each leg of its flight.")]
[Min(1)]
public float FleeLegMetres

Field Value

float

GroupMax

[Tooltip("Most animals in a group.")]
[Min(1)]
public int GroupMax

Field Value

int

GroupMin

[Tooltip("Fewest animals in a group (a herd or a pack).")]
[Min(1)]
public int GroupMin

Field Value

int

GroupsPerKm2

[Tooltip("Groups per square kilometre of suitable ground.")]
[Min(0)]
public float GroupsPerKm2

Field Value

float

Habitats

[Header("Placement")]
[Tooltip("Ground it lives on (the biome's habitat). Settlements, sea and keep-outs are never used.")]
public BiomeHabitat Habitats

Field Value

BiomeHabitat

Material

[Tooltip("The wildlife material (FishMMO/Wildlife shader). Shared by every species: colours ride the mesh.")]
public Material Material

Field Value

Material

RespawnMaxSeconds

[Tooltip("Seconds before a fallen member is replaced: the longest.")]
[Min(0)]
public float RespawnMaxSeconds

Field Value

float

RespawnMinSeconds

[Tooltip("Seconds before a fallen member is replaced: the shortest.")]
[Min(0)]
public float RespawnMinSeconds

Field Value

float

Role

[Tooltip("How this species treats everything around it.")]
public WildlifeRole Role

Field Value

WildlifeRole

RunSpeed

[Tooltip("Metres per second while fleeing, hunting or charging.")]
[Min(0.1)]
public float RunSpeed

Field Value

float

SafeMetres

[Tooltip("Prey: how far every threat must be before it stops running.")]
[Min(1)]
public float SafeMetres

Field Value

float

WalkSpeed

[Header("Movement")]
[Tooltip("Metres per second while grazing, wandering or returning.")]
[Min(0.1)]
public float WalkSpeed

Field Value

float