CollectionTerritory
Version support
Section titled “Version support”| Version | Status |
|---|---|
| v92 | Full |
| v90 | - |
| v86 | - |
CollectionTerritory_{category}.xml files define gathering node territories: where collection points appear in the world, their spawn behavior, and individual spawn positions.
DSL support
Section titled “DSL support”Entity: collectionTerritories
Operations: create, update, delete, upsert
File organization: CategoryVariants — one XML file per world area category
Quick recipes
Section titled “Quick recipes”Create territory
Section titled “Create territory”spec: version: "1.0" schema: v92
collectionTerritories: target: "13_ATW_P" create: - territoryId: 100 desc: "Herb Field" isExtractorTerritory: falseCreate 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: 180Update territory
Section titled “Update territory”spec: version: "1.0" schema: v92
collectionTerritories: target: "13_ATW_P" update: - territoryId: 200 changes: desc: "Rich Mining Cave" isExtractorTerritory: trueUpdate 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: 45Omitting the spawns key preserves the entry’s existing <Spawn> children unchanged. Supplying spawns (even as []) clears and replaces them.
Remove nested collections entries
Section titled “Remove nested collections entries”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).
Upsert
Section titled “Upsert”spec: version: "1.0" schema: v92
collectionTerritories: target: "13_ATW_P" upsert: - territoryId: 300 desc: "Crystal Formation" isExtractorTerritory: falseDelete
Section titled “Delete”spec: version: "1.0" schema: v92
collectionTerritories: target: "13_ATW_P" delete: - 200Properties reference
Section titled “Properties reference”Territory attributes
Section titled “Territory attributes”| Attribute | Type | Since | Required | Description |
|---|---|---|---|---|
territoryId | int | v92 | Yes | Unique territory identifier |
desc | string | v92 | No | Territory description |
isExtractorTerritory | bool | v92 | No | Whether this is an extractor territory |
Nested elements
Section titled “Nested elements”| Attribute | Type | Since | Description |
|---|---|---|---|
collections | list[Collections] | v92 | Collection point definitions. See Collections. |
Nested elements
Section titled “Nested elements”Collections
Section titled “Collections”Defines a collection point within a territory. Required fields depend on the operation context.
| Attribute | Type | Since | Required | Description |
|---|---|---|---|---|
collectionsId | int | v92 | Always | Collection point identifier (merge key) |
desc | string | v92 | No | Collection point description |
typeId | int | v92 | create / upsert | Collection type identifier |
giftNum | int | v92 | create / upsert | Number of items awarded per gather |
spawnNum | int | v92 | create / upsert | Number of spawn positions |
respawnTime | int | v92 | create / upsert | Respawn interval in seconds |
lawlessExtractorPriority | int | v92 | No | Lawless extractor priority |
randomRespawnTime | int | v92 | No | Random variance on respawn time |
spawns | list[Spawn] | v92 | No | Spawn 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.
removeCollections (update only)
Section titled “removeCollections (update only)”| Field | Type | Since | Description |
|---|---|---|---|
removeCollections | list[int] | v92 | List 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.
| Attribute | Type | Since | Required | Description |
|---|---|---|---|---|
pos | decimal[] | v92 | Yes | Spawn position [x, y, z] |
dir | int | v92 | No | Facing direction in degrees |
XML structure
Section titled “XML structure”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?Common pitfalls
Section titled “Common pitfalls”- Target required: The
targetfield specifies the category suffix for file selection (e.g.,"13_ATW_P"targetsCollectionTerritory_13_ATW_P.xml). - Merge-by-key on update: Each entry in
update.changes.collectionsis matched bycollectionsId. A matching entry is updated in place; a non-matching id creates a new entry. - Spawn preservation vs. replacement: On
update, omitting thespawnskey leaves existing<Spawn>children untouched. Supplyingspawns(includingspawns: []) clears and replaces them. - Mutual exclusion (E552): A
collectionsIdvalue cannot appear in bothcollectionsandremoveCollectionsin the samechangesblock. - Coordinate format: Spawn
posuses[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
targetcategory.