TerritoryParty
Overview
Section titled “Overview”TerritoryData files define territory parties: groups of NPCs that spawn and respawn together as a unit. Parties control collective respawn behavior, formation spawning, and boss designation within a territory area.
Version Support
Section titled “Version Support”| Version | Status |
|---|---|
| v92 | Full |
| v90 | - |
| v86 | - |
DSL Support
Section titled “DSL Support”Entity: territoryParties
Operations: create, update, delete, upsert
Key attributes: huntingZoneId, groupId, territoryId, partyId (composite key)
Quick Recipes
Section titled “Quick Recipes”Create
Section titled “Create”spec: version: "1.0" schema: v92
territoryParties: create: - huntingZoneId: 400 groupId: 1 territoryId: 1 partyId: 1 desc: "Boss Party" partySpawn: true partyRespawnTime: 300 flock: false bossInstanceId: 5001 npcs: - npcInstanceId: 5001 npcTemplateId: 42010 memberId: 0 desc: "Boss NPC" pos: [150.0, 200.0, 0.0] dir: 180 offsetZ: 0 randomPos: false escapeLocation: [0, 0, 0] spawnCount: 1 respawnTime: 300 conditionalSpawn: false ai: 0 isAggressiveMonster: true isReturn: true returnDistance: 2000 moveInTerritory: true viewRadius: 40 viewAngle: 360 alertRadius: 60 alertAngle: 360 questPatrol: false aggroShareGroupId: 0 aggroSendToPartyDistance: 0 aggroSendToClanDistance: 0 aggroIgnorePartyId: "" aggroReceiveOnlyInSight: falseUpdate
Section titled “Update”spec: version: "1.0" schema: v92
territoryParties: update: - huntingZoneId: 400 groupId: 1 territoryId: 1 partyId: 1 changes: partyRespawnTime: 600 flock: true desc: "Updated Boss Party"Delete
Section titled “Delete”spec: version: "1.0" schema: v92
territoryParties: delete: - huntingZoneId: 400 groupId: 1 territoryId: 1 partyId: 1Upsert
Section titled “Upsert”spec: version: "1.0" schema: v92
territoryParties: upsert: - huntingZoneId: 400 groupId: 1 territoryId: 1 partyId: 1 desc: "Upserted Party" partySpawn: true partyRespawnTime: 300 flock: false bossInstanceId: 0Properties Reference
Section titled “Properties Reference”Required Attributes
Section titled “Required Attributes”| Attribute | Type | Since | Description |
|---|---|---|---|
huntingZoneId | int | v92 | Hunting zone identifier (used for file partitioning) |
groupId | int | v92 | Parent territory group identifier |
territoryId | int | v92 | Parent territory area identifier |
partyId | int | v92 | Unique party identifier within the territory |
desc | string | v92 | Party description |
partySpawn | bool | v92 | Whether the party spawns as a unit |
partyRespawnTime | int | v92 | Party respawn time in seconds |
flock | bool | v92 | Whether party members flock together |
bossInstanceId | int | v92 | Boss NPC instance ID reference (0 for no boss) |
Optional Attributes
Section titled “Optional Attributes”| Attribute | Type | Since | Description |
|---|---|---|---|
partyRespawnRandomTime | int | v92 | Random variance added to respawn time |
partyAutoRespawn | bool | v92 | Whether the party auto-respawns after all members die |
autoRespawn | bool | v92 | Individual NPC auto-respawn override |
randomFormationSpawn | bool | v92 | Randomize formation on spawn |
delaySpawnTimeWhenWorldStart | int | v92 | Spawn delay when server starts |
Inline NPC Members
Section titled “Inline NPC Members”| Attribute | Type | Since | Description |
|---|---|---|---|
npcs | list[TerritorySpawn] | v92 | NPC members of this party. See TerritorySpawn schema. |
XML Structure
Section titled “XML Structure”TerritoryData_{huntingZoneId}.xml└── TerritoryData (huntingZoneId) └── TerritoryGroup (id) └── TerritoryList └── Territory (id) └── Party (id, desc, partySpawn, ...) [multiple] └── Npc [multiple] → see TerritorySpawnCommon Pitfalls
Section titled “Common Pitfalls”-
Composite key: Parties are identified by
huntingZoneId,groupId,territoryId, ANDpartyId. All four are required for update and delete operations. -
Inline NPC creation: When creating a party with
npcs, the NPCs are created as children of the party element. These NPCs can also be managed independently via theterritorySpawnsentity. -
Boss instance ID: Set
bossInstanceIdto0for parties without a boss. The value references theinstanceIdof the boss NPC within the party.