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, kind: "spawn", position: Position, spawn_key: Name }Fields
| Name | Type | Meaning |
|---|---|---|
definition | SpawnDefinitionId | Definition 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 |
kind | "spawn" | Discriminant |
position | Position | Destination together with its map instance. |
spawn_key | Name | Key unique within this result; with the invocation it derives the actor reference. Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$ |
Validated example
{
"definition": "core:hill_golem",
"kind": "spawn",
"position": {
"map": "m1",
"x_mm": 226000,
"y_mm": 0,
"z_mm": -175000
},
"spawn_key": "golem"
}