EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

spawn

Spawn an NPC, enemy or animal at a free position near the given one; actor_spawned names the new actor next tick.

Signature

{ definition: SpawnDefinitionId, group: (Name)?, kind: "spawn", position: Position, spawn_key: Name, squad: (SpawnSquad)? }

Fields

NameTypeMeaning
definitionSpawnDefinitionIdDefinition the new actor instantiates.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: npc|enemy|animal
groupNameSpawn group the actor belongs to for as long as it lives (saved with it; `defeat` objectives may count only it); absent: none.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
kind"spawn"Discriminant
positionPositionDestination together with its map instance.
spawn_keyNameKey unique within this result; with the invocation it derives the actor reference.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
squadSpawnSquadSquad of an enemy or a hunting animal: figures spawned by one result with the same squad name fight as one squad (independent of `group`); absent: it fights alone with its kind's role.

Validated example

{
  "definition": "core:hill_golem",
  "kind": "spawn",
  "position": {
    "map": "m1",
    "x_mm": 226000,
    "y_mm": 0,
    "z_mm": -175000
  },
  "spawn_key": "golem"
}