Beacons
Asset path: Server/NPC/Spawn/Beacons/*.json
A spawning configuration used to spawn NPCs around the player when the player is within a specific radius from the beacon. When Environments are defined for the beacon, beacons of that type will be dynamically created while the player is in one of the specified environments.
Parent
When set this asset will inherit properties from the named asset.
When inheriting from another BeaconNPCSpawn most properties will simply be copied from the parent asset to this asset. In the case where both child and parent provide a field the child field will simply replace the value provided by the parent, in the case of nested structures this will apply to the fields within the structure. In some cases the field may decide to act differently, for example: by merging the parent and child fields together.
Type information: String
NPCs
A required list of Role Spawn Parameters defining each NPC that can be spawned and their relative weights.
Type information:
Array of the type: A set of parameters that configure spawning for a single NPC type.
RoleSpawnParameters with the following properties:
| Key | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Id | String | The Role ID of the NPC to spawn. | ||||||||||||||||||
| Weight | Number defaults to: 0.0 | The relative weight of this NPC (chance of being spawned is this value relative to the sum of all weights). | ||||||||||||||||||
| SpawnBlockSet | (Nullable) String | An optional BlockSet reference that defines which blocks this NPC can spawn on. | ||||||||||||||||||
| SpawnFluidTag | (Nullable) String | An optional tag reference that defines which fluids this NPC can spawn on. | ||||||||||||||||||
| MovementModes | (Nullable) Map of the following:
Map of MovementMode
| An optional map of movement modes with weights >0.0 that this NPC will use to spawn. If not set then the NPC will use backwards compatible defaults. | ||||||||||||||||||
| EnableSafeSpawning | Boolean defaults to: true | When true (default), movement modes that are unsafe for this NPC's configuration are excluded from spawning. Set to false to allow spawning in all supported movement modes. | ||||||||||||||||||
| Flock | (Nullable) Either String or FlockAsset | The optional flock definition to spawn around this NPC. |
Despawn
Optional Despawn Parameters to control NPC despawning.
Type information:
(Nullable) A set of parameters that determine if NPCs should despawn.
DespawnParameters with the following properties:
| Key | Type | Description |
|---|---|---|
| DayTimeRange | (Nullable) Array of Number | An optional hour range within which the NPCs will despawn (between 0 and 24). For Spawn Beacons, this refers to the beacon itself. |
| MoonPhaseRange | (Nullable) Array of Integer | An optional moon phase range during which the NPCs will despawn (must be greater than or equal to 0). For Spawn Beacons, this refers to the beacon itself. |
DayTimeRange
An optional hour range within which the NPCs/beacon will spawn (between 0 and 24).
Type information: (Nullable) Array of Number
MoonPhaseRange
An optional moon phase range during which the NPCs/beacon will spawn (must be greater than or equal to 0).
Type information: (Nullable) Array of Integer
LightRanges
Optional light ranges to spawn the NPCs/beacon in, defined between 0 and 100.
Type information:
(Nullable) Map of the following:
| Key | Type | Description |
|---|---|---|
| Light | Array of Number | Total light level. |
| SkyLight | Array of Number | Light level based on how deep under cover the position is relative to the open sky (e.g. inside a cave will be low SkyLight). |
| Sunlight | Array of Number | Light level based on time of day (peaks at around noon and is 0 during most of the night). |
| RedLight | Array of Number | Red light level. |
| GreenLight | Array of Number | Green light level. |
| BlueLight | Array of Number | Blue light level. |
ScaleDayTimeRange
If set to true, instead of using absolute hour values for DayTimeRange, it will be scaled based on the world's DaytimePortion.
- 0 and 24 will represent the middle of the night portion.
- 6 will represent the moment of sunrise.
- 12 will represent the middle of the day portion.
- 18 will represent the moment of sunset.
Type information: Boolean defaults to: true
Tags
Tags are a general way to describe an asset that can be interpreted by other systems in a way they see fit.
For example you could tag something with a Material tag with the values Solid and Stone, And another single tag Ore.
Tags will be expanded into a single list of tags automatically. Using the above example with Material and Ore the end result would be the following list of tags: Ore, Material, Solid, Stone, Material=Solid and Material=Stone.
Type information:
(Nullable) Map of the following:
| Key | Type |
|---|---|
any String | Array of String |
Model
An optional model to represent the beacon in the world.
Type information: (Nullable) String
Reference to a ModelAsset asset
Environments
A required list of environments that this configuration covers. Each combination of environment and NPC in this configuration should be unique.
For Beacon NPC Spawn configurations, this can be left empty. In this case, these define the environments this beacon can be dynamically spawned in. If left empty, the beacon will not be dynamically spawned (e.g. if it should only be spawned by an objective).
Type information: Array of String
Reference to a Environment asset
WeatherIds
An optional list of weathers. The beacon only spawns while the current weather is one of these. If omitted or empty, the beacon spawns in any weather.
The current weather is the world's forced weather, if one is set. Otherwise it is the weather of the environment at the beacon's position.
A placed beacon removes itself and despawns its NPCs when the weather stops matching.
Type information: (Nullable) Array of String
TargetDistanceFromPlayer
Roughly how far the NPC should be spawned away from the player (this is a guideline and not an absolute).
Type information: Number defaults to: 15.0
MinDistanceFromPlayer
A hard cutoff for how close an NPC can be spawned to the player to prevent the guideline distance above resulting in an NPC spawning too close to them.
Type information: Number defaults to: 5.0
YRange
The acceptable y range within which NPCs can be spawned from the beacon. This is defined as offsets from the beacon. With [ -5, 5 ], NPCs can be spawned from five blocks below the beacon up to five blocks above.
Type information: (Nullable) Array of Integer
MaxSpawnedNPCs
The maximum number of NPCs this beacon can have spawned at once.
Type information: Integer defaults to: 1
ConcurrentSpawnsRange
The range from which a random number will be chosen that will represent the number of NPCs to be spawned in the next round between cooldowns.
Type information: (Nullable) Array of Integer
SpawnAfterGameTimeRange
The random range from which to pick the next game-time based cooldown between spawns. This should be a duration string, e.g. [ "PT5M", "PT10M" ] which will spawn between 5 and 10 in-game minutes after the last spawn.
Type information: (Nullable) Array of String
SpawnAfterRealTimeRange
The random range from which to pick the next real-time based cooldown between spawns. This should be a duration string, e.g. [ "PT30S", "PT80S" ] which will spawn between 30 and 80 seconds IRL after the last spawn.
Type information: (Nullable) Array of String
InitialSpawnDelayRange
An optional range from which to pick an initial delay in real time seconds before which the first round of NPCs will be spawned after a beacon is created.
Type information: (Nullable) Array of Number
NPCIdleDespawnTime
The number of seconds an NPC spawned by this beacon needs to spend idle before it will be despawned due to having no target. If NPCSpawnState is omitted, this will be ignored.
Type information: Number defaults to: 10.0
BeaconVacantDespawnGameTime
The amount of game time that needs to pass with no players present within the SpawnRadius before this beacon will remove itself. This should be a duration string.
Type information: (Nullable) String
BeaconRadius
The radius within which a spawned NPC is considered to be under the influence of the beacon and NPCs will be spawned for a player. If an NPC spawned by the beacon moves outside this radius and is not in a busy state, it will begin to tick down the NPCIdleDespawnTime (if being considered). It is recommended that this be ~25% larger than the SpawnRadius.
Type information: Number defaults to: 20.0
SpawnRadius
The radius within which NPCs spawns can physically happen (i.e. where their spawn points will be).
Type information: Number defaults to: 15.0
NPCSpawnState
An optional state to force the NPC into upon spawn. If this state exists on the NPC, it will immediately enter the state upon spawn. For example, setting this to Chase will result in most NPCs immediately going for the player they were spawned around. If omitted, this beacon will allow idle NPCs.
Type information: (Nullable) String
NPCSpawnSubState
As with NPCSpawnStat, but acts as an additional qualifier to define the desired substate.
Type information: (Nullable) String
TargetSlot
The locked target slot to set the player to in the NPC.
Type information: String that matches the pattern: [^\s] and is at least 1 characters long defaults to: LockedTarget
Rebind
Whether the target slot rebinds to the entity, so it survives short reloads or role changes.
Type information: Boolean defaults to: false
SpawnSuppression
An optional spawn suppression that will be tied to this beacon.
Type information: (Nullable) String
Reference to a SpawnSuppression asset
OverrideSpawnSuppressors
Whether this beacon should ignore any spawn suppressions.
Type information: Boolean defaults to: false
MaxSpawnsScalingCurve
A scaled response curve that represents the number of additional mobs to be added to the total MaxSpawnedNPCs based on the number of players within the beacon's max DistanceRange.
Type information:
(Nullable) A response curve that is scaled on both the x and y axes.
ScaledXYResponseCurve with the following properties:
| Key | Type | Description |
|---|---|---|
| ResponseCurve | String | The response curve to scale |
| XRange | (Nullable) Array of Number | The range to map the x axis to. e.g. [ 0, 10 ] |
| YRange | (Nullable) Array of Number | The range to map the y axis to. e.g. [ 0, 10 ] |
ConcurrentSpawnsScalingCurve
A scaled response curve that represents the number of additional mobs to be added to the total MaxConcurrentSpawns based on the number of players within the beacon's max DistanceRange.
Type information:
(Nullable) A response curve that is scaled on both the x and y axes.
ScaledXYResponseCurve with the following properties:
| Key | Type | Description |
|---|---|---|
| ResponseCurve | String | The response curve to scale |
| XRange | (Nullable) Array of Number | The range to map the x axis to. e.g. [ 0, 10 ] |
| YRange | (Nullable) Array of Number | The range to map the y axis to. e.g. [ 0, 10 ] |
Debug
The debug mode. Can be used to print 2d maps of evaluated spawn regions.
Type information:
(Nullable) Any one of the following String (defaults to Disabled):
| Name | Description |
|---|---|
"Disabled" | Disable map printing. |
"Irregularities" | Print only irregular maps. |
"All" | Print all maps. |
