Skip to content

WorldNPCSpawn

← Back to Asset Types

Documentation for the WorldNPCSpawn asset type.

Location

NPC/Spawn/World

Use in Your Files

Add this to your JSON files for IDE autocompletion and validation:

"$schema": "https://hytaledb.ginco.gg/schemas/WorldNPCSpawn.schema.json"

Schema

NPCs array

A required list of Role Spawn Parameters defining each NPC that can be spawned and their relative weights.

Array items: RoleSpawnParameters
Despawn unknown

Optional Despawn Parameters to control NPC despawning.

Any of
DespawnParameters
null
DayTimeRange arraynull

An optional hour range within which the NPCs/beacon will spawn (between 0 and 24).

Array items: number
MoonPhaseRange arraynull

An optional moon phase range during which the NPCs/beacon will spawn (must be greater than or equal to 0).

Array items: integer
LightRanges objectnull

Optional light ranges to spawn the NPCs/beacon in, defined between 0 and 100.

Light array

Total light level.

Array items: number
SkyLight array

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

Array items: number
Sunlight array

Light level based on time of day (peaks at around noon and is 0 during most of the night).

Array items: number
RedLight array

Red light level.

Array items: number
GreenLight array

Green light level.

Array items: number
BlueLight array

Blue light level.

Array items: number
Additional properties: array
ScaleDayTimeRange boolean

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.

Default:true
Environments array

A required list of environments that this configuration covers. Each combination of environment and NPC in this configuration should be unique.

Array items: string
MoonPhaseWeightModifiers arraynull

An array of modifiers which will be multiplied into the weights for each NPC in this config dependent on the current moon phase. At present, Hytale has 5 moon phases, with day 0 being a full moon which gradually wanes up to day 4 which is a new moon. These are represented in the array indices. Each modifier can only be between 0 and 2, where 0 means the NPC will not spawn at all, 1 will use the standard weight, and 2 will result in twice the spawns e.g. `[ 0, 0, 0.5, 1, 2 ]` would result in NPCs that do not spawn during day 0 and day 1 (full moon and three quarters), would spawn half as much on day 2, the defined amount on day 3, and twice as many on day 4 (new moon).

Array items: number
All of
base