Class AISwimSettings
- Namespace
- FishMMO.Server.Implementation.World.SceneServer.AI
- Assembly
- FishMMO.Server.dll
Whether, and how, an archetype's NPCs swim (2026-10-05: not all NPCs can swim; swimming NPCs will probably drown, and an AI decides whether to chase into the water or stay on land).
[Serializable]
public class AISwimSettings
- Inheritance
-
AISwimSettings
- Inherited Members
Remarks
Off by default: an archetype that says nothing never sets foot in deep water, which is what every existing creature did before there was any (the NavMesh's Deep Water area is outside its mask).
Fields
BreathSeconds
[Tooltip("Seconds it can hold its breath under water (divers and bed-walkers).")]
[Min(1)]
public float BreathSeconds
Field Value
CanSwim
[Tooltip("Whether this archetype's NPCs go into water too deep to wade at all.")]
public bool CanSwim
Field Value
Courage
[Tooltip("How much risk it will take for a target, 0 (never wets a foot it need not) to 1 (into anything).")]
[Range(0, 1)]
public float Courage
Field Value
Mode
[Tooltip("How it swims: at the surface, head out; or under, holding its breath.")]
public AISwimMode Mode
Field Value
ShorePatience
[Tooltip("Seconds it waits on the shore for a target out in the water before letting it go.")]
[Min(1)]
public float ShorePatience
Field Value
SwimSkill
[Tooltip("How good a swimmer it is, 0 to 1: how far it will swim, and how fast.")]
[Range(0, 1)]
public float SwimSkill
Field Value
Properties
DeepWaterCost
What Deep Water costs its paths, against land's 1: a bold, able swimmer cuts across, a timid one goes round if there is a way round at all.
public float DeepWaterCost { get; }
Property Value
HoldsBreath
True when its head is under water as it swims, so it holds its breath.
public bool HoldsBreath { get; }
Property Value
Methods
SwimSpeed(float)
Its speed in water, m/s, from its speed on land: a third to two thirds of it, by skill.
public float SwimSpeed(float landSpeed)
Parameters
landSpeedfloat