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
Extension Methods

Fields

Chance

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

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

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

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

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).

public float SpawnCapPlayerScaling

Field Value

float

Methods

Clone()

Creates a deep copy of this set of spawn conditions.

public RuntimeSpawnConditions Clone()

Returns

RuntimeSpawnConditions