Skip to content

TerritoryParty

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.

VersionStatus
v92Full
v90-
v86-

Entity: territoryParties Operations: create, update, delete, upsert Key attributes: huntingZoneId, groupId, territoryId, partyId (composite key)


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: false
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"
spec:
version: "1.0"
schema: v92
territoryParties:
delete:
- huntingZoneId: 400
groupId: 1
territoryId: 1
partyId: 1
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: 0

AttributeTypeSinceDescription
huntingZoneIdintv92Hunting zone identifier (used for file partitioning)
groupIdintv92Parent territory group identifier
territoryIdintv92Parent territory area identifier
partyIdintv92Unique party identifier within the territory
descstringv92Party description
partySpawnboolv92Whether the party spawns as a unit
partyRespawnTimeintv92Party respawn time in seconds
flockboolv92Whether party members flock together
bossInstanceIdintv92Boss NPC instance ID reference (0 for no boss)
AttributeTypeSinceDescription
partyRespawnRandomTimeintv92Random variance added to respawn time
partyAutoRespawnboolv92Whether the party auto-respawns after all members die
autoRespawnboolv92Individual NPC auto-respawn override
randomFormationSpawnboolv92Randomize formation on spawn
delaySpawnTimeWhenWorldStartintv92Spawn delay when server starts
AttributeTypeSinceDescription
npcslist[TerritorySpawn]v92NPC members of this party. See TerritorySpawn schema.

TerritoryData_{huntingZoneId}.xml
└── TerritoryData (huntingZoneId)
└── TerritoryGroup (id)
└── TerritoryList
└── Territory (id)
└── Party (id, desc, partySpawn, ...) [multiple]
└── Npc [multiple] → see TerritorySpawn

  • Composite key: Parties are identified by huntingZoneId, groupId, territoryId, AND partyId. 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 the territorySpawns entity.

  • Boss instance ID: Set bossInstanceId to 0 for parties without a boss. The value references the instanceId of the boss NPC within the party.