Skip to main content

BiomeAttribute

A class in Root.Township, the global namespace.

A named world generation value, such as prosperity, elevation or slope, that biomes set ranges for. Spawn and loot rules read these values from SpawnData attributes.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private float defaultMaximumBacking field for DefaultMaximum, the top of the random range when no value is set.
private float defaultMinimumBacking field for DefaultMinimum, the bottom of the random range when no value is set.
private float extraPerLayerBacking field for ExtraPerLayer: added per cave layer depth.
private bool isProceduralBacking field for IsProcedural. Procedural attributes are blended along forest edges into spawn data.

Properties​

MemberWhat it is
float DefaultMaximum { get; }Upper value used when a biome doesn't set this attribute.
float DefaultMinimum { get; }Lower value used when a biome doesn't set this attribute.
float ExtraPerLayer { get; }Added once per depth layer in cave biomes, so the value grows deeper down.
bool IsProcedural { get; }When true, forest spawning averages the value between the two nodes of the nearest path edge.

Used in​

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