CONTENT CONTRACT · VERSION 1
encounter
Who an encounter spawns and how far it reaches: roaming enemies and wildlife.
Signature
{ id: ContentId, kind: "encounter", members: {EncounterMember}, name: TextKey, roaming: (RoamingRules)?, trigger_radius_mm: PositiveDistance, when: ({StoryCondition})? }Fields
| Name | Type | Meaning |
|---|---|---|
id | ContentId | Package-qualified identity; unique within its declaring namespace. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
kind | "encounter" | Discriminant |
members | {EncounterMember} | Ordered member rules; each spawn takes the first rule it matches and the last rule matches every spawn. Items: 1…32 |
name | TextKey | Localization key for the displayed name. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
roaming | RoamingRules | Roaming spawns near players away from the spawn point: how often and how many at once. Every encounter with roaming spawns runs on the start map. |
trigger_radius_mm | PositiveDistance | A roaming group's post lies about this far from a player; the group comes there from out of every player's view (ruleset.spawn_view). Range: 1…2147483647; Unit: mm |
when | {StoryCondition} | Global quest stages and world variables under which its roaming spawns appear (as `world_object.when`); absent: always. Its spawns already out stay. Items: 1…16 |
Validated example
{
"id": "core:bandit_stragglers",
"kind": "encounter",
"members": [
{
"actor": "core:bandit_archer",
"every": 1,
"max_distance_mm": 0,
"min_distance_mm": 0,
"offset": 0,
"position": "last"
},
{
"actor": "core:bandit_raider",
"every": 1,
"max_distance_mm": 0,
"min_distance_mm": 0,
"offset": 0,
"position": "any"
}
],
"name": "core:bandit_stragglers_name",
"roaming": {
"center": "core:valley/camp",
"group_size": 2,
"max_alive": 2,
"regions": [
{
"anchor": "core:valley/bandit_woods_north",
"radius_mm": 25000
},
{
"anchor": "core:valley/bandit_woods_east",
"radius_mm": 35000
}
],
"sanctuaries": [
{
"anchor": "core:valley/camp",
"radius_mm": 80000
},
{
"anchor": "core:valley/arrival",
"radius_mm": 40000
},
{
"anchor": "core:valley/camp_center",
"radius_mm": 45000
},
{
"anchor": "core:valley/handover_crate",
"radius_mm": 15000
}
],
"spawn_ticks": 9000
},
"trigger_radius_mm": 24000,
"when": [
{
"max": 1,
"min": 1,
"variable": "core:bandits_roam"
}
]
}