CCompensationData
Version Support
Section titled “Version Support”| Version | Status |
|---|---|
| v92 | Full |
| v90 | - |
| v86 | - |
CCompensation_{zone}.xml defines class compensation data: NPC drop rewards with class-specific branching, allowing different loot tables for different character classes.
DSL Support
Section titled “DSL Support”Entity: cCompensations
Operations: create, update, delete, upsert
File Organization: Zone-partitioned (one file per huntingZoneId)
Quick Recipes
Section titled “Quick Recipes”Create with Class Branches
Section titled “Create with Class Branches”spec: version: "1.0"
cCompensations: create: - huntingZoneId: 9001 npcTemplateId: 3001 npcName: "ClassBoss" classBranches: - className: "warrior" itemBags: - probability: 0.5 items: - templateId: 50001 name: "Warrior Armor" min: 1 max: 1 probability: 0.3 - className: "archer" itemBags: - probability: 0.5 items: - templateId: 50002 name: "Archer Bow" min: 1 max: 1 probability: 0.3 - className: "sorcerer" itemBags: - probability: 0.5 items: - templateId: 50003 name: "Sorcerer Staff" min: 1 max: 1 probability: 0.3Creates a compensation entry with class-specific loot tables.
Create with Direct ItemBags (No Class Branching)
Section titled “Create with Direct ItemBags (No Class Branching)”spec: version: "1.0"
cCompensations: create: - huntingZoneId: 9001 npcTemplateId: 3002 npcName: "SharedLootBoss" itemBags: - probability: 0.75 items: - templateId: 60001 name: "Universal Token" min: 5 max: 10 probability: 1.0 isPublic: trueCreates a compensation with shared loot that applies to all classes.
Create with Auto-Distribution
Section titled “Create with Auto-Distribution”spec: version: "1.0"
cCompensations: create: - huntingZoneId: 9001 npcTemplateId: 3005 npcName: "AutoDistBoss" itemBags: - probability: 0.5 distribution: auto items: - templateId: 60001 name: "Token A" - templateId: 60002 name: "Token B" - templateId: 60003 name: "Token C"When distribution: auto is set, item probabilities are calculated automatically as 1/n. The first item receives any remainder to ensure the sum equals exactly 1.0. In this example: 0.34, 0.33, 0.33.
Min and max default to 1 when omitted, reducing boilerplate for single-quantity drops.
Create with Both Class Branches and Shared ItemBags
Section titled “Create with Both Class Branches and Shared ItemBags”spec: version: "1.0"
cCompensations: create: - huntingZoneId: 9001 npcTemplateId: 3003 npcName: "HybridBoss" classBranches: - className: "warrior" itemBags: - probability: 0.3 items: - templateId: 50001 name: "Warrior Token" min: 1 max: 3 probability: 1.0 - className: "priest" itemBags: - probability: 0.3 items: - templateId: 50004 name: "Priest Token" min: 1 max: 3 probability: 1.0 itemBags: - probability: 0.5 items: - templateId: 60001 name: "Common Material" min: 1 max: 5 probability: 1.0Creates a compensation with both class-specific and shared drops.
Update
Section titled “Update”spec: version: "1.0"
cCompensations: update: - huntingZoneId: 9001 npcTemplateId: 3001 changes: npcName: "UpdatedClassBoss" classBranches: - className: "warrior" itemBags: - probability: 0.75Updates an existing class compensation entry.
Delete
Section titled “Delete”spec: version: "1.0"
cCompensations: delete: - huntingZoneId: 9001 npcTemplateId: 3001Removes the class compensation entry.
Upsert
Section titled “Upsert”spec: version: "1.0"
cCompensations: upsert: - huntingZoneId: 9001 npcTemplateId: 3004 npcName: "NewClassBoss" classBranches: - className: "lancer" itemBags: - probability: 0.4 items: - templateId: 50005 name: "Lancer Weapon" min: 1 max: 1 probability: 0.2Creates or replaces the class compensation entry.
Managing Class Branches, Bags, and Items
Section titled “Managing Class Branches, Bags, and Items”The DSL uses replace-all semantics for nested structures. There are no granular operations to add or remove individual class branches, bags, or items. Instead, use the update operation with a complete hierarchy.
Adding a new class branch to an existing compensation:
spec: version: "1.0"
cCompensations: update: - huntingZoneId: 9001 npcTemplateId: 3001 changes: classBranches: # Include existing class branch you want to keep - className: "warrior" itemBags: - probability: 0.5 items: - templateId: 50001 name: "Warrior Armor" min: 1 max: 1 probability: 0.3 # Add the new class branch - className: "priest" itemBags: - probability: 0.5 items: - templateId: 50004 name: "Priest Staff" min: 1 max: 1 probability: 0.3Removing a class branch/bag: Simply omit it from the respective list in your update.
Adding an item to an existing bag: Include all existing items plus the new one in the bag’s items list.
Removing an item: Omit it from the bag’s items list.
Properties Reference
Section titled “Properties Reference”Compensation (Root Entry)
Section titled “Compensation (Root Entry)”| Property | Type | Since | Required | Description |
|---|---|---|---|---|
huntingZoneId | int | v92 | Yes | Hunting zone ID (file partition key) |
npcTemplateId | int | v92 | Yes | Unique NPC template ID (primary key) |
npcName | string | v92 | Yes | Internal NPC name |
classBranches | list | v92 | No | List of class-specific loot branches |
itemBags | list | v92 | No | List of shared item bags (all classes) |
ClassBranch (Nested)
Section titled “ClassBranch (Nested)”| Property | Type | Since | Required | Description |
|---|---|---|---|---|
className | string | v92 | Yes | Character class identifier |
itemBags | list | v92 | No | List of item bags for this class |
ItemBag (Nested)
Section titled “ItemBag (Nested)”Note: ItemBags in CCompensation are simpler than I/E compensations, using only probability for identification.
| Property | Type | Since | Required | Description |
|---|---|---|---|---|
probability | decimal | v92 | Yes | Drop probability (0.0 to 1.0), also serves as identifier |
distribution | string | v92 | No | Distribution mode: auto (calculate probabilities) or manual (default, require explicit probabilities) |
items | list | v92 | No | List of items in this bag |
Item (Nested)
Section titled “Item (Nested)”| Property | Type | Since | Required | Description |
|---|---|---|---|---|
templateId | int | v92 | Yes | Item template ID |
name | string | v92 | Yes | Display name for the item |
min | int | v92 | No | Minimum drop quantity. Defaults to 1 |
max | int | v92 | No | Maximum drop quantity. Defaults to 1 |
probability | decimal | v92 | No | Individual item drop probability. Required unless parent bag has distribution: auto |
isPublic | boolean | v92 | No | Whether drop is announced publicly |
XML Structure
Section titled “XML Structure”CCompensationData uses 5-level nesting with class branching:
CCompensationData (huntingZoneId)└── Compensation (npcName, npcTemplateId) ├── ClassItemBag (class) │ └── ItemBag (probability) [max 3] │ └── Item (templateId, name, min, max, probability, isPublic?) └── ItemBag (probability) └── Item (templateId, name, min, max, probability, isPublic?)Notation:
attr?= optional attribute[max N]= maximum occurrence count
Enum Reference
Section titled “Enum Reference”ClassName
Section titled “ClassName”Common class identifiers used in className field:
| Value |
|---|
warrior |
lancer |
slayer |
berserker |
sorcerer |
archer |
priest |
mystic |
reaper |
gunner |
brawler |
ninja |
valkyrie |
Note: Exact class names may vary by game version and localization.
Common Pitfalls
Section titled “Common Pitfalls”-
Composite Key: CCompensation uses
huntingZoneId+npcTemplateIdas composite key. -
Dual Branching Paths: CCompensation supports both
classBranches(class-specific) anditemBags(shared). Both can be used simultaneously. -
ItemBag Identification: Unlike I/E compensations, CCompensation’s ItemBags use
probabilityas identifier rather than a separateidfield. -
Class Name Matching: The
classNamemust match exactly with game class identifiers. Case sensitivity may apply. -
Nested ItemBags Limit: Each ClassItemBag can contain at most 3 ItemBag entries.
-
5-Level Nesting: Similar to FCompensation, CCompensation has deep nesting. Ensure proper YAML indentation.
-
Shared vs Class-Specific: Items in root
itemBagsdrop for all classes. Items inclassBranchesonly drop for matching classes. -
Replace-All for Nested Structures: The DSL does not support granular add/remove for class branches, bags, or items. When updating
classBranchesoritemBags, the entire collection is replaced. Include all class branches, bags, and items you want to preserve in your update operation. -
Default Min/Max: When
minormaxis omitted from items, they default to1. Only specify when different values are needed. -
Auto-Distribution: Use
distribution: autoon ItemBag to auto-calculate item probabilities. Items without explicit probability receive equal share (1/n). Items with explicit probability keep their value, remaining probability is distributed to others.