Table of Contents

Class RuntimeSpawnConditions

Namespace
Vintagestory.API.Common.Entities
Assembly
VintagestoryAPI.dll

A set of spawn conditions for chunks that have already been generated. Most properties are got from BaseSpawnConditions.

[DocumentAsJson]
public class RuntimeSpawnConditions : BaseSpawnConditions
Inheritance
RuntimeSpawnConditions
Inherited Members
Extension Methods

Fields

Chance

The chance, usually between 0 (0% chance) and 1 (100% chance), for the entity to spawn during the spawning round.

[DocumentAsJson]
public double Chance

Field Value

double

MaxQuantity

The max number of this entity that can ever exist in the world for a single player. With more than one player, the max number is actually (this)x(current player count)x(SpawnCapPlayerScaling). Consider using MaxQuantityByGroup to allow a max quantity based from many entities.

[DocumentAsJson]
public int MaxQuantity

Field Value

int

MaxQuantityByGroup

The max quantity of objects to spawn based on a wildcard group of entities.
For example, using MaxQuantity will allow a max of 20 pig-wild-male instances. Using this with a group of "pig-*" will allow a max of 20 pig entities, regardless if male, female, or piglet.

[DocumentAsJson]
public QuantityByGroup MaxQuantityByGroup

Field Value

QuantityByGroup

MinDistanceToPlayer

The minimum distance from the player that an object will spawn.

[DocumentAsJson]
public int MinDistanceToPlayer

Field Value

int

SpawnCapPlayerScaling

The maximum number of this entity that can exist in the world is MaxQuantity x (current player count) x (this).

[DocumentAsJson]
public float SpawnCapPlayerScaling

Field Value

float

doneInitialLoad

Set server-side after this has been loaded once, used only for error logging purposes

public bool doneInitialLoad

Field Value

bool

Methods

Clone()

Creates a deep copy of this set of spawn conditions.

public RuntimeSpawnConditions Clone()

Returns

RuntimeSpawnConditions