Skip to main content

PopulationSetup

A class in Root.Township, Alta.Populations.

Asset defining a population: how fast it spawns and where its members may be placed. Looked up by hash; also used as a fill set when placing members.

Constructors​

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

Fields​

5 private and internal fields
MemberWhat it is
private bool isMovingBacking field for IsMoving. Turn on for creatures.
private float maximumFailScoreBacking field for MaximumFailScore, the top of the range the fill picks a random fail threshold from (0 to 1).
private float minimumFailScoreBacking field for MinimumFailScore, the bottom of the range the fill picks a random fail threshold from (0 to 1).
private SpawnModifiers spawnModifiersBacking field for SpawnModifiers. The first (point) modifier isn't used.
private SpawnRate spawnRateBacking field for SpawnRate.

Properties​

MemberWhat it is
bool IsClearingOnUnload { get; }Always false.
bool IsMoving { get; }Whether the members move around (turn on for creatures).
float MaximumFailScore { get; }Top of the random score range a spot must beat when placing.
float MinimumFailScore { get; }Bottom of the random score range a spot must beat when placing.
SpawnModifiers SpawnModifiers { get; }Rules that score and adjust spawn spots. The first (point) modifiers are not used.
SpawnRate SpawnRate { get; }Spawn rate settings: density, respawn interval, growth and emerge rate.

Used in​

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