Struct EntitySpawnEntry
Dictates a list of items that can be spawned.
Assembly: Content.Shared.dll
Syntax
public struct EntitySpawnEntry
Constructors
|
Improve this Doc
View Source
EntitySpawnEntry()
Declaration
public EntitySpawnEntry()
Fields
|
Improve this Doc
View Source
Amount
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
GroupId
orGroup signifies to pick between entities designated with an ID.
To define an orGroup in a StorageFill component you
need to add it to the entities you want to choose between and
add a prob field. In this example there is a 50% chance the storage
spawns with Y or Z.
- type: StorageFill
contents:
- name: X
- name: Y
prob: 0.50
orGroup: YOrZ
- name: Z
orGroup: YOrZ
Declaration
Field Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
MaxAmount
How many of this can be spawned, in total.
If this is lesser or equal to Amount, it will spawn Amount exactly.
Otherwise, it chooses a random value between Amount and MaxAmount on spawn.
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
PrototypeId
Declaration
public string? PrototypeId
Field Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
SpawnProbability
The probability that an item will spawn. Takes decimal form so 0.05 is 5%, 0.50 is 50% etc.
Declaration
public float SpawnProbability
Field Value
Type |
Description |
System.Single |
|
Extension Methods