Skip to content

CollectionTerritory

VersionStatus
v92Full
v90-
v86-

CollectionTerritory_{category}.xml files define gathering node territories: where collection points appear in the world, their spawn behavior, and individual spawn positions.


Entity: collectionTerritories Operations: create, update, delete, upsert File organization: CategoryVariants — one XML file per world area category


spec:
version: "1.0"
schema: v92
collectionTerritories:
target: "13_ATW_P"
create:
- territoryId: 100
desc: "Herb Field"
isExtractorTerritory: false

Create territory with collections and spawns

Section titled “Create territory with collections and spawns”
spec:
version: "1.0"
schema: v92
collectionTerritories:
target: "13_ATW_P"
create:
- territoryId: 200
desc: "Mining Cave"
isExtractorTerritory: true
collections:
- collectionsId: 5001
desc: "Iron Vein"
typeId: 1
giftNum: 10
spawnNum: 3
respawnTime: 60
spawns:
- pos: [150.5, 200.0, 0.0]
dir: 90
- pos: [180.0, 210.5, 0.0]
dir: 180
spec:
version: "1.0"
schema: v92
collectionTerritories:
target: "13_ATW_P"
update:
- territoryId: 200
changes:
desc: "Rich Mining Cave"
isExtractorTerritory: true

Update nested collections (partial attribute edit)

Section titled “Update nested collections (partial attribute edit)”

Only collectionsId is required. Omitted attributes are preserved. If collectionsId matches an existing entry it is updated in-place; if not found a new entry is created.

spec:
version: "1.0"
schema: v92
collectionTerritories:
target: "13_ATW_P"
update:
- territoryId: 200
changes:
collections:
- collectionsId: 5001
typeId: 2
respawnTime: 45

Omitting the spawns key preserves the entry’s existing <Spawn> children unchanged. Supplying spawns (even as []) clears and replaces them.

spec:
version: "1.0"
schema: v92
collectionTerritories:
target: "13_ATW_P"
update:
- territoryId: 200
changes:
removeCollections: [5002, 5003]

removeCollections and collections can be combined in the same changes block as long as no collectionsId appears in both lists (E552).

spec:
version: "1.0"
schema: v92
collectionTerritories:
target: "13_ATW_P"
upsert:
- territoryId: 300
desc: "Crystal Formation"
isExtractorTerritory: false
spec:
version: "1.0"
schema: v92
collectionTerritories:
target: "13_ATW_P"
delete:
- 200

AttributeTypeSinceRequiredDescription
territoryIdintv92YesUnique territory identifier
descstringv92NoTerritory description
isExtractorTerritoryboolv92NoWhether this is an extractor territory
AttributeTypeSinceDescription
collectionslist[Collections]v92Collection point definitions. See Collections.

Defines a collection point within a territory. Required fields depend on the operation context.

AttributeTypeSinceRequiredDescription
collectionsIdintv92AlwaysCollection point identifier (merge key)
descstringv92NoCollection point description
typeIdintv92create / upsertCollection type identifier
giftNumintv92create / upsertNumber of items awarded per gather
spawnNumintv92create / upsertNumber of spawn positions
respawnTimeintv92create / upsertRespawn interval in seconds
lawlessExtractorPriorityintv92NoLawless extractor priority
randomRespawnTimeintv92NoRandom variance on respawn time
spawnslist[Spawn]v92NoSpawn points. Omit to preserve existing; supply (even []) to clear-and-replace.

On update, all attributes except collectionsId are optional — omitted attributes are left unchanged. If collectionsId is not found in the target territory, a new entry is created.

FieldTypeSinceDescription
removeCollectionslist[int]v92List of collectionsId values to remove from the territory. Attempting to remove a non-existent id is an execution error (E500).

Defines an individual spawn position within a collection point.

AttributeTypeSinceRequiredDescription
posdecimal[]v92YesSpawn position [x, y, z]
dirintv92NoFacing direction in degrees

CollectionData/CollectionTerritory_{category}.xml
└── CollectionTerritory (root, id, continentId, areaName)
└── Territory (0..∞)
@id (required)
@desc?
@isExtractorTerritory?
└── Collections (0..∞)
@id (required)
@desc?
@typeId (required)
@giftNum (required)
@spawnNum (required)
@respawnTime (required)
@lawlessExtractorPriority?
@randomRespawnTime?
└── Spawn (0..∞)
@pos (required, "x,y,z")
@dir?

  • Target required: The target field specifies the category suffix for file selection (e.g., "13_ATW_P" targets CollectionTerritory_13_ATW_P.xml).
  • Merge-by-key on update: Each entry in update.changes.collections is matched by collectionsId. A matching entry is updated in place; a non-matching id creates a new entry.
  • Spawn preservation vs. replacement: On update, omitting the spawns key leaves existing <Spawn> children untouched. Supplying spawns (including spawns: []) clears and replaces them.
  • Mutual exclusion (E552): A collectionsId value cannot appear in both collections and removeCollections in the same changes block.
  • Coordinate format: Spawn pos uses [x, y, z] array format in YAML, serialized as "x,y,z" comma-separated string in XML.
  • CategoryVariants file organization: Each world area has its own XML file. Operations must specify the correct target category.