Skip to main content

Biome

A class in Root.Township, Alta.Caves.

Cave biome asset (under Caves/Biomes): loot tables, attribute ranges and element multipliers used by cave generation.

Constructors​

MemberWhat it is
Biome()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

4 private and internal fields
MemberWhat it is
private AttributeDoubleValue[] attributesBacking field for Attributes: min and max values per biome attribute, read by GetAttribute.
private ElementSingleValue[] elementsBacking field for Elements: per-element multipliers, read by GetElementMultiplier (1 when missing).
private LootTable[] lootTablesBacking field for LootTables, used when filling docks with generated loot.
private SpawnData spawnDataNot used in this class.

Properties​

MemberWhat it is
IEnumerable<AttributeDoubleValue> Attributes { get; }Attribute ranges, each with a min and max value.
IEnumerable<ElementSingleValue> Elements { get; }Element multipliers.
LootTable[] LootTables { get; }Loot tables used in this biome.

Methods​

MemberWhat it is
void GetAttribute(BiomeAttribute attribute, out float min, out float max)Gets the min and max for a biome attribute. Both 0 if not set.
float GetElementMultiplier(Element element)Gets the multiplier for an element. 1 if not set.

Used in​

Members of other types that take, return or hold a Biome: