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.

public class RuntimeSpawnConditions : BaseSpawnConditions
Inheritance
RuntimeSpawnConditions
Inherited Members

Fields

Chance (Recommended) (Default: 1)

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

public double Chance

Field Value

double

MaxQuantity (Recommended) (Default: 20)

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.

public int MaxQuantity

Field Value

int

MaxQuantityByGroup (Optional) (Default: None)

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.

public QuantityByGroup MaxQuantityByGroup

Field Value

QuantityByGroup

MinDistanceToPlayer (Optional) (Default: 18)

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

public int MinDistanceToPlayer

Field Value

int

SpawnCapPlayerScaling (Optional) (Default: 1)

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

public float SpawnCapPlayerScaling

Field Value

float