Table of Contents

Class ClimateSettings

Namespace
FishMMO.Shared.Biomes
Assembly
FishMMO.Shared.dll

The climate model, as data. Every constant WorldEditor's biome generation hard-codes — the lapse rate, the humidity curve, the latitude gradient, the elevation-tier boundaries — is a field here, so a scene can be a frozen north or a tropical coast by asset, and a weather system can push the offsets at runtime through WorldSceneSettings.

[CreateAssetMenu(fileName = "New Climate", menuName = "FishMMO/Biomes/Climate Settings", order = 2)]
public class ClimateSettings : CachedScriptableObject<ClimateSettings>, ICachedObject
Inheritance
Object
ScriptableObject
ClimateSettings
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

ColdDryingRate

[Tooltip("Humidity lost per unit of temperature below the threshold.")]
[Range(0, 2)]
public float ColdDryingRate

Field Value

float

ColdDryingThreshold

[Tooltip("Temperature below which cold air holds less moisture.")]
[Range(-1, 1)]
public float ColdDryingThreshold

Field Value

float

DefaultElevationBoundaries

Elevation-tier boundaries WorldEditor generates with: 0, 8 cut-offs, 1.

public static readonly float[] DefaultElevationBoundaries

Field Value

float[]

DefaultVariants

[Header("Default climate variants")]
[Tooltip("Variants applied to any biome that lists none of its own, matched in order.")]
public List<BiomeClimateVariant> DefaultVariants

Field Value

List<BiomeClimateVariant>

ElevationBoundaries

[Header("Elevation tiers")]
[Tooltip("Ten ascending values: 0, eight tier cut-offs, 1. Tier n spans [boundary n, boundary n+1).")]
public float[] ElevationBoundaries

Field Value

float[]

ElevationLapseRate

[Header("Temperature model")]
[Tooltip("How much temperature drops from sea floor to the highest peak.")]
[Range(0, 2)]
public float ElevationLapseRate

Field Value

float

GlobalHumidityOffset

[Tooltip("Shifts every humidity reading: -1 drought … +1 monsoon.")]
[Range(-1, 1)]
public float GlobalHumidityOffset

Field Value

float

GlobalTemperatureOffset

[Header("Global climate")]
[Tooltip("Shifts every temperature reading: -1 ice age … +1 hothouse.")]
[Range(-1, 1)]
public float GlobalTemperatureOffset

Field Value

float

HeatDryingRate

[Tooltip("Humidity lost per unit of temperature above the threshold.")]
[Range(0, 2)]
public float HeatDryingRate

Field Value

float

HeatDryingThreshold

[Tooltip("Temperature above which air dries out.")]
[Range(-1, 1)]
public float HeatDryingThreshold

Field Value

float

LowlandHumidityBonus

[Header("Humidity model")]
[Tooltip("Extra humidity at the lowest elevations, fading to none at the highest.")]
[Range(0, 1)]
public float LowlandHumidityBonus

Field Value

float

UsePlanetTemperature

[Tooltip("When on, temperature falls with distance from the equator (the map's centre line).")]
public bool UsePlanetTemperature

Field Value

bool

WaterSurfaceHeight

[Tooltip("Normalised height of the water surface.")]
[Range(0, 1)]
public float WaterSurfaceHeight

Field Value

float

Methods

Evaluate(float, float)

Temperature and humidity at a normalised height and latitude (0 south edge … 1 north edge).

public ClimateSample Evaluate(float height, float latitude01)

Parameters

height float
latitude01 float

Returns

ClimateSample

FindDefaultVariant(string)

A default variant by key, for requests that name one.

public BiomeClimateVariant FindDefaultVariant(string variantKey)

Parameters

variantKey string

Returns

BiomeClimateVariant

ResolveVariant(BiomeTemplate, ClimateSample)

The variant a biome shows under this reading: the biome's own first, else the defaults, else null.

public BiomeClimateVariant ResolveVariant(BiomeTemplate biome, ClimateSample sample)

Parameters

biome BiomeTemplate
sample ClimateSample

Returns

BiomeClimateVariant

TierForHeight(float)

The elevation tier (0-8) a normalised height falls in.

public int TierForHeight(float height)

Parameters

height float

Returns

int

TierForHeight(float, float[])

public static int TierForHeight(float height, float[] boundaries)

Parameters

height float
boundaries float[]

Returns

int